Skip to content

Commit 90666a8

Browse files
authored
[AMD] Explicitly set ConvertToBufferOps small tensor option (#8470)
Recently, a new pass option is added to bufferop pass. However, the driver side (compiler.py/compiler.cc) does not feed the option-value explicitly to the pass. Default value is used for the option-value. To resolve this problem, all pass-options are fed explicitly by driver, i.e., no default value.
1 parent 2172bb4 commit 90666a8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

third_party/amd/backend/compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ def make_ttgir(mod, metadata, options):
243243
if knobs.amd.use_buffer_ops:
244244
amd.passes.ttgpuir.add_canonicalize_pointers(pm)
245245
passes.common.add_canonicalizer(pm)
246-
amd.passes.ttgpuir.add_convert_to_buffer_ops(pm, options.arch, knobs.amd.use_buffer_atomics)
246+
amd.passes.ttgpuir.add_convert_to_buffer_ops(pm, options.arch, knobs.amd.use_buffer_atomics, False)
247247

248248
amd.passes.ttgpuir.add_fold_true_cmpi(pm)
249249
passes.common.add_canonicalizer(pm)

third_party/amd/python/triton_amd.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ void init_triton_amd_passes_ttgpuir(py::module &&m) {
8383
pm.addNestedPass<mlir::triton::FuncOp>(
8484
mlir::createTritonAMDGPUCanonicalizePointers());
8585
});
86-
ADD_PASS_OPTION_WRAPPER_2("add_convert_to_buffer_ops",
86+
ADD_PASS_OPTION_WRAPPER_3("add_convert_to_buffer_ops",
8787
mlir::createTritonAMDGPUConvertToBufferOps,
88-
const std::string &, bool);
88+
const std::string &, bool, bool);
8989
ADD_PASS_WRAPPER_0("add_reorder_instructions",
9090
mlir::createTritonAMDGPUReorderInstructions);
9191
ADD_PASS_WRAPPER_0("add_fold_true_cmpi", mlir::createTritonAMDFoldTrueCmpI);

0 commit comments

Comments
 (0)