Open mhokchuekchuek opened 5 months ago
Hi @mhokchuekchuek,
Would you be able to provide instructions on how to reproduce this error? Which version of the YoloV10 model code are you executing?
A minimal reproduction would allow us to debug on our end and let us diagnose which component is failing. The error that you see most likely occurs when moving parameters to the XLA device, but it is unclear from the context why this is happening.
@jluntamazon,
I apologize for the previous unclear description. I have attached how to compile YOLOv10 in the description.
Hi @mhokchuekchuek,
Looking at the code, it's unnecessary to have fuse=True
here since our compiler will fuse operators together optimally for our hardware. Furthermore, when fuse=True
, the manipulations done to the module code results in a model that can't change it's device due to the existence of non-leaf tensors. This was the reason that torch_neuronx.trace
failed in the first place.
When we set fuse=False
, the model compiles and we're able to get 8-10ms latency on neuron vs 140ms on cpu. However, we've found the resulting model produces incorrect output. We are working on fixing the correctness issue and will respond as soon as we have an update.
I compile YOLOv10 on
inf1
andinf2
.model complication
inf1
inf1
is OKinf2
Inf2
I got an error when checking theis leaf param
, see more the error in compiler outputafter the errors, I comment
assert param.is_leaf
in this, I can compile my model to inf2then I check pytorch v.1.1.3, it also check
is leaf params
in this but everything is fine on inf1can you explain what I did wrong when I compile in
inf2
?how to compile
follow this instruction to start the ec2, then activate the env
source /opt/aws_neuronx_venv_pytorch_2_1/bin/activate
clone this repo then cd to directory
compile
in yolov10load model yolov10 weight via this command
install yolov10 requirements
run model compiler command
compiler output
env