// RUN: mlir-opt %s \ // RUN: --nvvm-attach-target='module=nvvm.* O=3 chip=sm_90' \ // RUN: --rocdl-attach-target='module=rocdl.* O=3 chip=gfx90a' \ // RUN: --xevm-attach-target='module=xevm.* O=3 chip=pvc' \ // RUN: | FileCheck %s // RUN: mlir-opt %s \ // RUN: --nvvm-attach-target='module=options.* O=1 chip=sm_70 fast=true ftz=true' \ // RUN: --rocdl-attach-target='module=options.* l=file1.bc,file2.bc wave64=false finite-only=true' \ // RUN: --xevm-attach-target='module=options.* O=1 chip=pvc' \ // RUN: | FileCheck %s --check-prefix=CHECK-OPTIONS module attributes {gpu.container_module} { // CHECK-LABEL: @nvvm_module_1 // CHECK-SAME: [#nvvm.target] gpu.module @nvvm_module_1 { } // CHECK-LABEL: @nvvm_module_2 // CHECK-SAME: [#nvvm.target, #nvvm.target] gpu.module @nvvm_module_2 [#nvvm.target] { } // Verify the target is not added multiple times. // CHECK-LABEL: @nvvm_module_3 // CHECK-SAME: [#nvvm.target] gpu.module @nvvm_module_3 [#nvvm.target] { } // Verify only the ROCDL target is added. // CHECK-LABEL: @rocdl_module // CHECK-SAME: [#rocdl.target] gpu.module @rocdl_module { } // Verify only the XeVM target is added. // CHECK-LABEL: @xevm_module // CHECK-SAME: [#xevm.target] gpu.module @xevm_module { } // CHECK-OPTIONS-LABEL: @options_module_1 // CHECK-OPTIONS-SAME: [#nvvm.target, // CHECK-OPTIONS-SAME: #rocdl.target, // CHECK-OPTIONS-SAME: #xevm.target] gpu.module @options_module_1 { } // CHECK-OPTIONS-LABEL: @options_module_2 // CHECK-OPTIONS-SAME: [#nvvm.target, // CHECK-OPTIONS-SAME: #nvvm.target, // CHECK-OPTIONS-SAME: #rocdl.target, // CHECK-OPTIONS-SAME: #xevm.target] gpu.module @options_module_2 [#nvvm.target] { } }