mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Typo fix in "Adding Op for MPS Backend" section around the first bullet
@ -3,7 +3,7 @@
|
|||||||
This page covers references about adding a new Op for the MPS backend.
|
This page covers references about adding a new Op for the MPS backend.
|
||||||
|
|
||||||
There are a few options to add support. We usually want to follow these in order:
|
There are a few options to add support. We usually want to follow these in order:
|
||||||
- If MPS has an existing op for the give PyTorch function, just add a new native function that link the two. An example PR that does this can be found [here](https://github.com/pytorch/pytorch/pull/78408).
|
- If MPS has an existing op for the given PyTorch function, just add a new native function that link the two. An example PR that does this can be found [here](https://github.com/pytorch/pytorch/pull/78408).
|
||||||
- Otherwise, for ops that require high performance implementation, we can write custom Metal kernel. There are no examples for this yet, feel free to open an issue to discuss this if you're interested.
|
- Otherwise, for ops that require high performance implementation, we can write custom Metal kernel. There are no examples for this yet, feel free to open an issue to discuss this if you're interested.
|
||||||
- As a last resort for ops that are not perf critical, we can make them use the CPU by default. This can be done similarly to the first bullet point but the native implementation is replaced by a new entry in [here](https://github.com/pytorch/pytorch/blob/3524428fad4e274fd9145595609effeb775cb51c/aten/src/ATen/mps/MPSFallback.mm#L38).
|
- As a last resort for ops that are not perf critical, we can make them use the CPU by default. This can be done similarly to the first bullet point but the native implementation is replaced by a new entry in [here](https://github.com/pytorch/pytorch/blob/3524428fad4e274fd9145595609effeb775cb51c/aten/src/ATen/mps/MPSFallback.mm#L38).
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user