ROCm / AMDMIGraphX

AMD's graph optimization engine.
https://rocm.docs.amd.com/projects/AMDMIGraphX/en/latest/
MIT License
187 stars 87 forks source link

shapes are not in standard layout #1335

Open HikariTJU opened 2 years ago

HikariTJU commented 2 years ago

I'm running maskrcnn onnx model from link and get the error below

terminate called after throwing an instance of 'migraphx::version_1::exception'
  what():  /code/AMDMIGraphX/src/include/migraphx/check_shapes.hpp:211: standard: scatter_none: Shapes are not in standard layout
[1]    37853 abort (core dumped)  migraphx-driver perf --onnx MaskRCNN-12.onnx

using MIGraphX Version: 2.3 compiled from latest develop branch and rocm=5.2.1 on mi210

CharlieL7 commented 2 years ago

This model can take images of different sizes as input. However, to achieve best performance, it is recommended to resize the image such that both height and width are within the range of [800, 1333], and then pad the image with zeros such that both height and width are divisible by 32.

HikariTJU commented 2 years ago

Hi, I delete the code that check shapes and it works, but fp16 still get error

terminate called after throwing an instance of 'migraphx::version_1::exception'
  what():  /code/AMDMIGraphX/src/include/migraphx/op/get_tuple_elem.hpp:56: compute_shape: GET_TUPLE_ELEM: index 0 is out of range 0
[1]    185791 abort (core dumped)  migraphx-driver perf --onnx MaskRCNN-12.onnx --input-dim @image 3 800 800 --fp16
CharlieL7 commented 2 years ago

The verify command that checks between the reference and GPU versions doesn't pass, so there's probably some bugs. Will have to investigate.