diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/autodiff/cuda-kernel-export.slang | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/autodiff/cuda-kernel-export.slang b/tests/autodiff/cuda-kernel-export.slang index 0db4d8cea..54442498b 100644 --- a/tests/autodiff/cuda-kernel-export.slang +++ b/tests/autodiff/cuda-kernel-export.slang @@ -1,4 +1,4 @@ -//DISABLED_TEST:SIMPLE: -target cuda -line-directive-mode none +//DISABLE_TEST:SIMPLE: -target cuda -line-directive-mode none // Verify that we can output a cuda device function with [CudaDeviceExport]. // Disabled until we have FileCheck. @@ -27,3 +27,15 @@ void diffF(inout DifferentialPair<MixedType> m, float dout) { __bwd_diff(f)(m, dout); } + +[CudaKernel] +void myKernel(float* inValues, float* outValues) +{ + outValues[0] = sin(inValues[0]); +} + +[CudaHost] +public __extern_cpp void runCompute(float *inValues, float *outValues, uint3 dispathcSize) +{ + __dispatch_kernel(myKernel, uint3(128, 1, 1), dispathcSize)(inValues, outValues); +}
\ No newline at end of file |
