yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
52b91231c
master
1//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): 2 3// Simple check to see if the compiler throws an error if a CUDA kernel is declared with non-void return type. 4 5[CudaKernel] 6[Differentiable] 7void myBadKernel(float x, TensorView<float> t1, TensorView<float> t2) 8{ 9 // CHECK: tests/diagnostics/cuda-kernel-differentiable-params.slang([[@LINE-2]]): error 31214: differentiable kernel entry point cannot have differentiable parameters. Consider using DiffTensorView to pass differentiable data, or marking this parameter with 'no_diff' 10 // CHECK-NEXT: void myBadKernel(float x, TensorView<float> t1, TensorView<float> t2) 11 // CHECK-NEXT: ^ 12} 13 14[CudaKernel] 15void myGoodKernel(float x, TensorView<float> t1, TensorView<float> t2) 16{ 17 18}