- Newest
- Most votes
- Most comments
You have two potential solutions:
-
Execute this operation on the CPU.
-
Manually implement the operation using the NKI (Neuron Kernel Interface).
You are right that ResizeBilinear isn't supported yet in the SDK. You have a few options to get around that.
In general:
-
You could change your code to use another function that is supported (I don't think there is a good alternative for ResizeBilinear unless you want to reimplement it with other functions)
-
You could partition the graph to run what can be run on Neuron, then move the calculations to CPU. See https://awsdocs-neuron.readthedocs-hosted.com/en/latest/frameworks/torch/torch-neuronx/api-reference-guide/inference/api-torch-neuronx-trace.html#graph-partitioner for an example of this. However, this is very likely to result in poor performance, especially if your model uses this function a lot.
-
It is possible that someone may contribute a version of that function to the NKI library. You can see that here: https://github.com/aws-neuron/nki-samples/tree/main (I don't see anything as of today)
-
You can write it yourself using NKI (Neuron Kernel Interface). See https://awsdocs-neuron.readthedocs-hosted.com/en/latest/general/nki/index.html for more information.
-
You can reach out to your AWS account manager / Solutions Architect about getting help with any of the above.
-
You could wait for the function to become available and use GPUs in the meantime. Not all models are a good fit for Neuron/Inferentia/Trainium at this time.
Relevant content
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 3 years ago
