Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUG] Fixing an error triggered from the
conv_channel_last_pass
whi…
…le compiling the model `sam` (#444) Closes #325 The error in the linked issue was caused by [this code segment](https://github.com/CentML/hidet/blob/bfbb4db6d7792ed3de3be4e9702e597b8fbbe373/python/hidet/graph/transforms/conv_channel_last.py#L46-L75) in `graph/transforms/conv_channel_last.py`. By the logic flow of this code segment, if the operator `node` has two inputs, the first one with rank 4 and the second rank 3(an example case in the model: an `AddOp` where the first input has shape `[1, 256, 64, 64]` and the second `[256, 1, 1]`) , then by the time the code reaches the line 75, the variable `new_perm`would have value `[1, 2, 0]`, and this value will be recorded as the permutation scheme used to get the new output, which is incorrect as the appropriate value should be `[0, 2, 3, 1]` here.
- Loading branch information