This PR introduces the conversion for shape-related static integer op attributes.
Currently in Relax the default integer dtype for shape-related values is int64, while TVM FFI’s default dtype for integers is int32. This means when our TVMScript parser parsing an integer attribute of a operator, the parsed dtype will be int32, the default integer dtype of FFI.
However, for shape-related attributes we hope them to have int64 dtype. Therefore, this PR will actively converts them to int64 upon construction of op calls. To simplify the conversion, we change the type of these values from Integer to IntImm.
We add regression tests to make sure that these fields are indeed int64 after parsing.
This PR introduces the conversion for shape-related static integer op attributes.
Currently in Relax the default integer dtype for shape-related values is int64, while TVM FFI’s default dtype for integers is int32. This means when our TVMScript parser parsing an integer attribute of a operator, the parsed dtype will be int32, the default integer dtype of FFI.
However, for shape-related attributes we hope them to have int64 dtype. Therefore, this PR will actively converts them to int64 upon construction of op calls. To simplify the conversion, we change the type of these values from
Integer
toIntImm
.We add regression tests to make sure that these fields are indeed int64 after parsing.