Files
rocm-systems/tests/hipify-clang/unit_tests/namespace/ns_kernel_launch.cu
T
Evgeny Mankov 3286ffdfc0 [HIPIFY][#1487][fix] Translate correctly kernel names prefixed with namespace
+ Modify CUDA2HIP_perl for the fix
+ Add ns_kernel_launch.cu test
+ Update hipify-perl by hipify-clang -perl
2019-10-08 15:58:48 +03:00

29 lines
645 B
Plaintext

// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
// CHECK: #include <hip/hip_runtime.h>
#include <cuda.h>
__global__ void test_0() {
int a = 10;
}
namespace first {
__global__ void test_1() {
int b = 20;
}
namespace second {
__global__ void test_2() {
int c = 30;
}
}
}
int main() {
// CHECK: hipLaunchKernelGGL(::test_0, dim3(1), dim3(1), 0, 0);
::test_0<<<1, 1>>>();
// CHECK: hipLaunchKernelGGL(first::test_1, dim3(1), dim3(1), 0, 0);
first::test_1<<<1, 1>>>();
// CHECK: hipLaunchKernelGGL(first::second::test_2, dim3(1), dim3(1), 0, 0);
first::second::test_2<<<1, 1>>>();
return 0;
}