Standalone operator Convolution_backwards for MLIR#4292
Conversation
|
Can you add some unit tests |
There was a problem hiding this comment.
Pull Request Overview
This PR adds MLIR support for the convolution_backwards operator to provide an alternative implementation when MIOPEN is not available (e.g., on Windows platforms).
- Adds mapping for
convolution_backwardsoperator to MLIR dialect operation - Implements predicate function to determine when
convolution_backwardscan use MLIR - Integrates the new backward convolution matcher into the MLIR fusion pipeline
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/targets/gpu/mlir.cpp | Maps convolution_backwards operator name to MLIR dialect operation |
| src/targets/gpu/fuse_mlir.cpp | Adds predicate function and matcher for backward convolution operations in MLIR |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
We do need to limit this to 2d convolution_backwards because I think thats the only one supported right now in MLIR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #4292 +/- ##
========================================
Coverage 92.22% 92.22%
========================================
Files 557 557
Lines 25924 25924
========================================
Hits 23908 23908
Misses 2016 2016 🚀 New features to boost your workflow:
|
|
You need to add tests for |
There was a problem hiding this comment.
Overall looks good. Have one ask and a question
Ask
- Add a test for batch size greater than one
Question - What do we do for datatypes like fp8/int8/ and smaller or is that not supported/intended for the backwards convolution since that should resolve to quant_convolution
This PR is to bypass MIOpen when we cannot use it. The current MLIR support, as reflected here in the PR, is for only 2D kernels, and of only the float types that have been added: |
|
@lakhinderwalia link updated test to this PR when you upload |
It is not the case of a simple environment variable here. I was looking for an example to handle more of |
|
Requested changes have been applied
This build is not recommended to merge 🔴 |
❌bert-mrpc-tf: ERROR - check error output2025-09-19 12:05:27.610617: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.To enable the following instructions: SSE3 SSE4.1 SSE4.2 AVX AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. Traceback (most recent call last): File "/src/AMDMIGraphX/tools/accuracy/accuracy_checker.py", line 359, in main() File "/src/AMDMIGraphX/tools/accuracy/accuracy_checker.py", line 306, in main graph = load_tf_graph(model_name) File "/src/AMDMIGraphX/tools/accuracy/accuracy_checker.py", line 300, in load_tf_graph graph_def.ParseFromString(f.read()) File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/lib/io/file_io.py", line 116, in read self._preread_check() File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/lib/io/file_io.py", line 77, in _preread_check self._read_buf = _pywrap_file_io.BufferedInputStream( tensorflow.python.framework.errors_impl.UnimplementedError: File system scheme '[local]' not implemented (file: '/new-saved-models/tf-misc/bert_mrpc1.pb') 🔴bert_large_uncased_fp16: FAILED: MIGraphX is not within tolerance - check verbose output🔴mask-rcnn: FAILED: MIGraphX is not within tolerance - check verbose output |
Motivation
Support Operator Convolution_backwards via MLIR
Technical Details
This support is necessary without MIOPEN, e.g. on Windows platforms.
Changelog Category