[OpenCLML] Transposed convolution support and other fixes#14767
[OpenCLML] Transposed convolution support and other fixes#14767echuraev merged 3 commits intoapache:mainfrom
Conversation
Added support for transposed convolution. Epsilon support for batchnorm op added - part of v3.0. CLML version query bug fixed.
|
Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.
Generated by tvm-bot |
echuraev
left a comment
There was a problem hiding this comment.
Thank you for your PR. In general LGTM. Some minor comments.
| name = "conv2d_transpose"; | ||
| const auto* conv_transpose_attr = nodes.conv->attrs.as<Conv2DTransposeAttrs>(); | ||
| ICHECK(conv_transpose_attr); | ||
| ICHECK(conv_transpose_attr->kernel_layout == "OIHW") |
There was a problem hiding this comment.
Is it necessary to check kernel_layout here? You have already done it in python/tvm/relay/op/contrib/clml.py. If it is not necessary, then probably the same checks can be removed for convolution.
There was a problem hiding this comment.
I will remove this check in python frontend. Codegen is the final component to make sure we don't generate incompatible code.
| """Utility function to get clml version version""" | ||
|
|
||
| return tvm.support.libinfo().get("TVM_CLML_VERSION", 2) | ||
| return int(tvm.support.libinfo().get("CLML_VERSION_MAJOR", 2)) |
There was a problem hiding this comment.
Why did you change TVM_CLML_VERSION on CLML_VERSION_MAJOR?
There was a problem hiding this comment.
The version check from libinfo was broken earlier and not functional. TVM_CLML_VERSION was compiler flag and cmake option is CLML_VERSION_MAJOR. We can maintain same for both.
76f43fc to
a7605af
Compare
Added support for transposed convolution.
Epsilon support for batchnorm op added - part of v3.0. CLML version query bug fixed.