diff options
| author | Alexander Belyaev <pifon@google.com> | 2019-10-26 08:20:59 -0700 |
|---|---|---|
| committer | A. Unique TensorFlower <gardener@tensorflow.org> | 2019-10-26 08:21:36 -0700 |
| commit | 780a108d31d798d4cc3c3373dfd26108a613ae0f (patch) | |
| tree | 61c899e9ce4dfc3a09e9aee714f45efeb897c9b9 /mlir/test/Conversion/GPUToROCDL | |
| parent | cde337cfdeecc495692caf42aa8fdd0bf89e7c50 (diff) | |
| download | bcm5719-llvm-780a108d31d798d4cc3c3373dfd26108a613ae0f.tar.gz bcm5719-llvm-780a108d31d798d4cc3c3373dfd26108a613ae0f.zip | |
Fix include guards and add tests for OpToFuncCallLowering.
PiperOrigin-RevId: 276859463
Diffstat (limited to 'mlir/test/Conversion/GPUToROCDL')
| -rw-r--r-- | mlir/test/Conversion/GPUToROCDL/gpu-to-rocdl.mlir | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/mlir/test/Conversion/GPUToROCDL/gpu-to-rocdl.mlir b/mlir/test/Conversion/GPUToROCDL/gpu-to-rocdl.mlir index 98573255d90..daa17ff734b 100644 --- a/mlir/test/Conversion/GPUToROCDL/gpu-to-rocdl.mlir +++ b/mlir/test/Conversion/GPUToROCDL/gpu-to-rocdl.mlir @@ -1,4 +1,4 @@ -// RUN: mlir-opt %s -lower-gpu-ops-to-rocdl-ops | FileCheck %s +// RUN: mlir-opt %s -lower-gpu-ops-to-rocdl-ops -split-input-file | FileCheck %s module attributes {gpu.kernel_module} { // CHECK-LABEL: func @gpu_index_ops() @@ -35,3 +35,20 @@ module attributes {gpu.kernel_module} { std.return } } + +// ----- + +module attributes {gpu.kernel_module} { + // CHECK: llvm.func @_ocml_exp_f32(!llvm.float) -> !llvm.float + // CHECK: llvm.func @_ocml_exp_f64(!llvm.double) -> !llvm.double + // CHECK-LABEL: func @gpu_exp + func @gpu_exp(%arg_f32 : f32, %arg_f64 : f64) { + %exp_f32 = std.exp %arg_f32 : f32 + // CHECK: llvm.call @_ocml_exp_f32(%{{.*}}) : (!llvm.float) -> !llvm.float + %result_f32 = std.exp %exp_f32 : f32 + // CHECK: llvm.call @_ocml_exp_f32(%{{.*}}) : (!llvm.float) -> !llvm.float + %result64 = std.exp %arg_f64 : f64 + // CHECK: llvm.call @_ocml_exp_f64(%{{.*}}) : (!llvm.double) -> !llvm.double + std.return + } +} |

