[Mlir-commits] [mlir] Change AMDGPU target initialization condition (PR #182367)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Feb 19 12:52:51 PST 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

* 3467 tests passed
* 414 tests skipped
* 6 tests failed

## Failed Tests
(click on a test name to see its output)

### MLIR
<details>
<summary>MLIR.Dialect/GPU/module-to-binary-rocdl.mlir</summary>

```
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe C:\_work\llvm-project\llvm-project\mlir\test\Dialect\GPU\module-to-binary-rocdl.mlir --gpu-module-to-binary="format=llvm" | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\mlir\test\Dialect\GPU\module-to-binary-rocdl.mlir
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\mlir-opt.exe' 'C:\_work\llvm-project\llvm-project\mlir\test\Dialect\GPU\module-to-binary-rocdl.mlir' --gpu-module-to-binary=format=llvm
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\mlir\test\Dialect\GPU\module-to-binary-rocdl.mlir:8:3: error: Failed to lookup target for triple 'amdgcn-amd-amdhsa' Unable to find target for this triple (no targets are registered)
# |   gpu.module @kernel_module1 [#rocdl.target<chip = "gfx90a">] {
# |   ^
# | C:\_work\llvm-project\llvm-project\mlir\test\Dialect\GPU\module-to-binary-rocdl.mlir:8:3: note: see current operation: 
# | "gpu.module"() <{sym_name = "kernel_module1", targets = [#rocdl.target<chip = "gfx90a">]}> ({
# |   "llvm.func"() <{CConv = #llvm.cconv<ccc>, function_type = !llvm.func<void (i32, ptr, ptr, i64, i64, i64)>, linkage = #llvm.linkage<external>, sym_name = "kernel", unnamed_addr = 0 : i64, visibility_ = 0 : i64}> ({
# |   ^bb0(%arg0: i32, %arg1: !llvm.ptr, %arg2: !llvm.ptr, %arg3: i64, %arg4: i64, %arg5: i64):
# |     "llvm.return"() : () -> ()
# |   }) {gpu.kernel} : () -> ()
# | }) : () -> ()
# | C:\_work\llvm-project\llvm-project\mlir\test\Dialect\GPU\module-to-binary-rocdl.mlir:8:3: error: Failed to lookup target for triple 'amdgcn-amd-amdhsa' Unable to find target for this triple (no targets are registered)
# |   gpu.module @kernel_module1 [#rocdl.target<chip = "gfx90a">] {
# |   ^
# | C:\_work\llvm-project\llvm-project\mlir\test\Dialect\GPU\module-to-binary-rocdl.mlir:8:3: note: see current operation: 
# | "gpu.module"() <{sym_name = "kernel_module1", targets = [#rocdl.target<chip = "gfx90a">]}> ({
# |   "llvm.func"() <{CConv = #llvm.cconv<ccc>, function_type = !llvm.func<void (i32, ptr, ptr, i64, i64, i64)>, linkage = #llvm.linkage<external>, sym_name = "kernel", unnamed_addr = 0 : i64, visibility_ = 0 : i64}> ({
# |   ^bb0(%arg0: i32, %arg1: !llvm.ptr, %arg2: !llvm.ptr, %arg3: i64, %arg4: i64, %arg5: i64):
# |     "llvm.return"() : () -> ()
# |   }) {gpu.kernel} : () -> ()
# | }) : () -> ()
# | C:\_work\llvm-project\llvm-project\mlir\test\Dialect\GPU\module-to-binary-rocdl.mlir:8:3: error: Target Machine unavailable for triple amdgcn-amd-amdhsa, can't optimize with LLVM
# | 
# |   gpu.module @kernel_module1 [#rocdl.target<chip = "gfx90a">] {
# |   ^
# | C:\_work\llvm-project\llvm-project\mlir\test\Dialect\GPU\module-to-binary-rocdl.mlir:8:3: note: see current operation: 
# | "gpu.module"() <{sym_name = "kernel_module1", targets = [#rocdl.target<chip = "gfx90a">]}> ({
# |   "llvm.func"() <{CConv = #llvm.cconv<ccc>, function_type = !llvm.func<void (i32, ptr, ptr, i64, i64, i64)>, linkage = #llvm.linkage<external>, sym_name = "kernel", unnamed_addr = 0 : i64, visibility_ = 0 : i64}> ({
# |   ^bb0(%arg0: i32, %arg1: !llvm.ptr, %arg2: !llvm.ptr, %arg3: i64, %arg4: i64, %arg5: i64):
# |     "llvm.return"() : () -> ()
# |   }) {gpu.kernel} : () -> ()
# | }) : () -> ()
# | C:\_work\llvm-project\llvm-project\mlir\test\Dialect\GPU\module-to-binary-rocdl.mlir:8:3: error: An error happened while serializing the module.
# |   gpu.module @kernel_module1 [#rocdl.target<chip = "gfx90a">] {
# |   ^
# | C:\_work\llvm-project\llvm-project\mlir\test\Dialect\GPU\module-to-binary-rocdl.mlir:8:3: note: see current operation: 
# | "gpu.module"() <{sym_name = "kernel_module1", targets = [#rocdl.target<chip = "gfx90a">]}> ({
# |   "llvm.func"() <{CConv = #llvm.cconv<ccc>, function_type = !llvm.func<void (i32, ptr, ptr, i64, i64, i64)>, linkage = #llvm.linkage<external>, sym_name = "kernel", unnamed_addr = 0 : i64, visibility_ = 0 : i64}> ({
# |   ^bb0(%arg0: i32, %arg1: !llvm.ptr, %arg2: !llvm.ptr, %arg3: i64, %arg4: i64, %arg5: i64):
# |     "llvm.return"() : () -> ()
# |   }) {gpu.kernel} : () -> ()
# | }) : () -> ()
# `-----------------------------
# error: command failed with exit status: 1
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\mlir\test\Dialect\GPU\module-to-binary-rocdl.mlir'
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\mlir\test\Dialect\GPU\module-to-binary-rocdl.mlir
# `-----------------------------
# error: command failed with exit status: 2

--

```
</details>
<details>
<summary>MLIR.python/dialects/gpu/module-to-binary-rocdl.py</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
"C:/Python312/python.exe" C:\_work\llvm-project\llvm-project\mlir\test\python\dialects\gpu\module-to-binary-rocdl.py | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\mlir\test\python\dialects\gpu\module-to-binary-rocdl.py
# executed command: C:/Python312/python.exe 'C:\_work\llvm-project\llvm-project\mlir\test\python\dialects\gpu\module-to-binary-rocdl.py'
# .---command stderr------------
# | Traceback (most recent call last):
# |   File "C:\_work\llvm-project\llvm-project\mlir\test\python\dialects\gpu\module-to-binary-rocdl.py", line 18, in <module>
# |     @run
# |      ^^^
# |   File "C:\_work\llvm-project\llvm-project\mlir\test\python\dialects\gpu\module-to-binary-rocdl.py", line 13, in run
# |     f()
# |   File "C:\_work\llvm-project\llvm-project\mlir\test\python\dialects\gpu\module-to-binary-rocdl.py", line 36, in testGPUToLLVMBin
# |     pm.run(module.operation)
# | mlir._mlir_libs._site_initialize.<locals>.MLIRError: Failure while executing pass pipeline:
# | error: "-":3:3: Failed to lookup target for triple 'amdgcn-amd-amdhsa' Unable to find target for this triple (no targets are registered)
# |  note: "-":3:3: see current operation: 
# |   "gpu.module"() <{sym_name = "kernel_module1", targets = [#rocdl.target<chip = "gfx90a">]}> ({
# |     "llvm.func"() <{CConv = #llvm.cconv<ccc>, function_type = !llvm.func<void (i32, ptr, ptr, i64, i64, i64)>, linkage = #llvm.linkage<external>, sym_name = "kernel", unnamed_addr = 0 : i64, visibility_ = 0 : i64}> ({
# |     ^bb0(%arg0: i32, %arg1: !llvm.ptr, %arg2: !llvm.ptr, %arg3: i64, %arg4: i64, %arg5: i64):
# |       "llvm.return"() : () -> ()
# |     }) {gpu.kernel} : () -> ()
# |   }) : () -> ()
# | error: "-":3:3: Failed to lookup target for triple 'amdgcn-amd-amdhsa' Unable to find target for this triple (no targets are registered)
# |  note: "-":3:3: see current operation: 
# |   "gpu.module"() <{sym_name = "kernel_module1", targets = [#rocdl.target<chip = "gfx90a">]}> ({
# |     "llvm.func"() <{CConv = #llvm.cconv<ccc>, function_type = !llvm.func<void (i32, ptr, ptr, i64, i64, i64)>, linkage = #llvm.linkage<external>, sym_name = "kernel", unnamed_addr = 0 : i64, visibility_ = 0 : i64}> ({
# |     ^bb0(%arg0: i32, %arg1: !llvm.ptr, %arg2: !llvm.ptr, %arg3: i64, %arg4: i64, %arg5: i64):
# |       "llvm.return"() : () -> ()
# |     }) {gpu.kernel} : () -> ()
# |   }) : () -> ()
# | error: "-":3:3: Target Machine unavailable for triple amdgcn-amd-amdhsa, can't optimize with LLVM
# |   
# |  note: "-":3:3: see current operation: 
# |   "gpu.module"() <{sym_name = "kernel_module1", targets = [#rocdl.target<chip = "gfx90a">]}> ({
# |     "llvm.func"() <{CConv = #llvm.cconv<ccc>, function_type = !llvm.func<void (i32, ptr, ptr, i64, i64, i64)>, linkage = #llvm.linkage<external>, sym_name = "kernel", unnamed_addr = 0 : i64, visibility_ = 0 : i64}> ({
# |     ^bb0(%arg0: i32, %arg1: !llvm.ptr, %arg2: !llvm.ptr, %arg3: i64, %arg4: i64, %arg5: i64):
# |       "llvm.return"() : () -> ()
# |     }) {gpu.kernel} : () -> ()
# |   }) : () -> ()
# | error: "-":3:3: An error happened while serializing the module.
# |  note: "-":3:3: see current operation: 
# |   "gpu.module"() <{sym_name = "kernel_module1", targets = [#rocdl.target<chip = "gfx90a">]}> ({
# |     "llvm.func"() <{CConv = #llvm.cconv<ccc>, function_type = !llvm.func<void (i32, ptr, ptr, i64, i64, i64)>, linkage = #llvm.linkage<external>, sym_name = "kernel", unnamed_addr = 0 : i64, visibility_ = 0 : i64}> ({
# |     ^bb0(%arg0: i32, %arg1: !llvm.ptr, %arg2: !llvm.ptr, %arg3: i64, %arg4: i64, %arg5: i64):
# |       "llvm.return"() : () -> ()
# |     }) {gpu.kernel} : () -> ()
# |   }) : () -> ()
# `-----------------------------
# error: command failed with exit status: 1
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\mlir\test\python\dialects\gpu\module-to-binary-rocdl.py'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\mlir\test\python\dialects\gpu\module-to-binary-rocdl.py:38:16: error: CHECK-LABEL: expected string not found in input
# |  # CHECK-LABEL:gpu.binary @kernel_module1
# |                ^
# | <stdin>:2:23: note: scanning from here
# | TEST: testGPUToLLVMBin
# |                       ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\mlir\test\python\dialects\gpu\module-to-binary-rocdl.py
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |           1:  
# |           2: TEST: testGPUToLLVMBin 
# | label:38                           X error: no match found
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>

### MLIR-Unit
<details>
<summary>MLIR-Unit.Target/LLVM/_/MLIRTargetLLVMTests_exe/MLIRTargetLLVMROCDL/SerializeROCDLToISAWithDefaultCOV</summary>

```
Script:
--
C:\_work\llvm-project\llvm-project\build\tools\mlir\unittests\Target\LLVM\.\MLIRTargetLLVMTests.exe --gtest_filter=MLIRTargetLLVMROCDL.SerializeROCDLToISAWithDefaultCOV
--
C:\_work\llvm-project\llvm-project\mlir\unittests\Target\LLVM\SerializeROCDLTarget.cpp:130
Value of: StringRef(object->getObject().data(), object->getObject().size()) .contains(".amdhsa_code_object_version 6")
  Actual: false
Expected: true


```
</details>
<details>
<summary>MLIR-Unit.Target/LLVM/_/MLIRTargetLLVMTests_exe/MLIRTargetLLVMROCDL/SerializeROCDLToISAWithNonDefaultCOV</summary>

```
Script:
--
C:\_work\llvm-project\llvm-project\build\tools\mlir\unittests\Target\LLVM\.\MLIRTargetLLVMTests.exe --gtest_filter=MLIRTargetLLVMROCDL.SerializeROCDLToISAWithNonDefaultCOV
--
C:\_work\llvm-project\llvm-project\mlir\unittests\Target\LLVM\SerializeROCDLTarget.cpp:157
Value of: StringRef(object->getObject().data(), object->getObject().size()) .contains(".amdhsa_code_object_version 4")
  Actual: false
Expected: true


```
</details>
<details>
<summary>MLIR-Unit.Target/LLVM/_/MLIRTargetLLVMTests_exe/MLIRTargetLLVMROCDL/SerializeROCDLToLLVM</summary>

```
Script:
--
C:\_work\llvm-project\llvm-project\build\tools\mlir\unittests\Target\LLVM\.\MLIRTargetLLVMTests.exe --gtest_filter=MLIRTargetLLVMROCDL.SerializeROCDLToLLVM
--
C:\_work\llvm-project\llvm-project\mlir\unittests\Target\LLVM\SerializeROCDLTarget.cpp:91
Value of: object != std::nullopt
  Actual: false
Expected: true


```
</details>
<details>
<summary>MLIR-Unit.Target/LLVM/_/MLIRTargetLLVMTests_exe/MLIRTargetLLVMROCDL/SerializeROCDLToPTX</summary>

```
Script:
--
C:\_work\llvm-project\llvm-project\build\tools\mlir\unittests\Target\LLVM\.\MLIRTargetLLVMTests.exe --gtest_filter=MLIRTargetLLVMROCDL.SerializeROCDLToPTX
--
C:\_work\llvm-project\llvm-project\mlir\unittests\Target\LLVM\SerializeROCDLTarget.cpp:180
Value of: object != std::nullopt
  Actual: false
Expected: true


```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

https://github.com/llvm/llvm-project/pull/182367


More information about the Mlir-commits mailing list