summaryrefslogtreecommitdiffstats
path: root/mlir/test/Dialect/GPU
diff options
context:
space:
mode:
authorChristian Sigg <csigg@google.com>2019-09-24 06:29:25 -0700
committerA. Unique TensorFlower <gardener@tensorflow.org>2019-09-24 06:29:54 -0700
commit74cdbf5909e57b42b6ed5b3b6eea4f76448a7d48 (patch)
tree1afd7a89c7e53b2f622fc80c646a3c4a19c5ee89 /mlir/test/Dialect/GPU
parenteba6014cdc1cc1a9d9732a2e9010afde2d9d898e (diff)
downloadbcm5719-llvm-74cdbf5909e57b42b6ed5b3b6eea4f76448a7d48.tar.gz
bcm5719-llvm-74cdbf5909e57b42b6ed5b3b6eea4f76448a7d48.zip
Clone called functions into nested GPU module.
PiperOrigin-RevId: 270891190
Diffstat (limited to 'mlir/test/Dialect/GPU')
-rw-r--r--mlir/test/Dialect/GPU/outlining.mlir14
1 files changed, 12 insertions, 2 deletions
diff --git a/mlir/test/Dialect/GPU/outlining.mlir b/mlir/test/Dialect/GPU/outlining.mlir
index fdfe8d08115..5f31486084b 100644
--- a/mlir/test/Dialect/GPU/outlining.mlir
+++ b/mlir/test/Dialect/GPU/outlining.mlir
@@ -113,8 +113,7 @@ func @function_call(%arg0 : memref<?xf32>) {
%grid_z = %cst)
threads(%tx, %ty, %tz) in (%block_x = %cst, %block_y = %cst,
%block_z = %cst) {
- // TODO(b/141098412): Support function calls.
- // expected-error @+1 {{'device_function' does not reference a valid function}}
+ call @device_function() : () -> ()
call @device_function() : () -> ()
gpu.return
}
@@ -122,5 +121,16 @@ func @function_call(%arg0 : memref<?xf32>) {
}
func @device_function() {
+ call @recursive_device_function() : () -> ()
gpu.return
}
+
+func @recursive_device_function() {
+ call @recursive_device_function() : () -> ()
+ gpu.return
+}
+
+// CHECK: @device_function
+// CHECK: @recursive_device_function
+// CHECK: @device_function
+// CHECK: @recursive_device_function
OpenPOWER on IntegriCloud