You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
446 B
16 lines
446 B
// RUN: mlir-opt -pass-pipeline="gpu.module(lower-affine)" %s | FileCheck %s
|
|
|
|
#map0gpufunc = affine_map<(d0) -> (d0)>
|
|
gpu.module @kernels {
|
|
gpu.func @foo(%arg0 : index, %arg1 : memref<?xf32>) -> f32 {
|
|
%0 = affine.apply #map0gpufunc(%arg0)
|
|
%1 = load %arg1[%0] : memref<?xf32>
|
|
gpu.return %1 : f32
|
|
}
|
|
|
|
// CHECK: gpu.func
|
|
// CHECK-SAME: %[[ARG0:.*]]: index
|
|
// CHECK-NOT: affine.apply
|
|
// CHECK: load %{{.*}}[%[[ARG0]]]
|
|
}
|