diff options
Diffstat (limited to 'mlir/test/Conversion/GPUToROCDL/gpu-to-rocdl.mlir')
-rw-r--r-- | mlir/test/Conversion/GPUToROCDL/gpu-to-rocdl.mlir | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mlir/test/Conversion/GPUToROCDL/gpu-to-rocdl.mlir b/mlir/test/Conversion/GPUToROCDL/gpu-to-rocdl.mlir index 31e78274fea3..aec44034451f 100644 --- a/mlir/test/Conversion/GPUToROCDL/gpu-to-rocdl.mlir +++ b/mlir/test/Conversion/GPUToROCDL/gpu-to-rocdl.mlir @@ -438,6 +438,21 @@ gpu.module @test_module { // ----- gpu.module @test_module { + // CHECK: llvm.func @__ocml_erf_f32(f32) -> f32 + // CHECK: llvm.func @__ocml_erf_f64(f64) -> f64 + // CHECK-LABEL: func @gpu_erf + func.func @gpu_erf(%arg_f32 : f32, %arg_f64 : f64) -> (f32, f64) { + %result32 = math.erf %arg_f32 : f32 + // CHECK: llvm.call @__ocml_erf_f32(%{{.*}}) : (f32) -> f32 + %result64 = math.erf %arg_f64 : f64 + // CHECK: llvm.call @__ocml_erf_f64(%{{.*}}) : (f64) -> f64 + func.return %result32, %result64 : f32, f64 + } +} + +// ----- + +gpu.module @test_module { // CHECK-LABEL: func @gpu_unroll func.func @gpu_unroll(%arg0 : vector<4xf32>) -> vector<4xf32> { %result = math.exp %arg0 : vector<4xf32> |