Skip to content

Commit

Permalink
Add missing WGSL intrinsics to test
Browse files Browse the repository at this point in the history
  • Loading branch information
expipiplus1 committed Nov 25, 2024
1 parent 65a761a commit 64db7e8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/autodiff/custom-intrinsic-1.slang
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -shaderobj -output-using-type
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj -output-using-type
// slang-test/WGPU: IR opcode during code emit #5263
//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu
//TEST(compute):COMPARE_COMPUTE_EX:-wgpu

//TEST_INPUT:ubuffer(data=[0 0 0 0 0], stride=4):out,name=outputBuffer
RWStructuredBuffer<float> outputBuffer;
Expand All @@ -19,6 +18,7 @@ namespace myintrinsiclib
__target_intrinsic(cpp, "$P_exp($0)")
__target_intrinsic(spirv, "12 resultType resultId glsl450 27 _0")
__target_intrinsic(metal, "exp($0)")
__target_intrinsic(wgsl, "exp($0)")
[ForwardDerivative(d_myexp<T>)]
T myexp(T x);

Expand All @@ -39,6 +39,7 @@ namespace myintrinsiclib
__target_intrinsic(cuda, "$P_sin($0)")
__target_intrinsic(cpp, "$P_sin($0)")
__target_intrinsic(spirv, "12 resultType resultId glsl450 13 _0")
__target_intrinsic(wgsl, "sin($0)")
[ForwardDerivative(d_mysin<T>)]
T mysin(T x);

Expand All @@ -58,6 +59,7 @@ namespace myintrinsiclib
__target_intrinsic(cuda, "$P_cos($0)")
__target_intrinsic(cpp, "$P_cos($0)")
__target_intrinsic(spirv, "12 resultType resultId glsl450 14 _0")
__target_intrinsic(wgsl, "cos($0)")
[ForwardDerivative(d_mycos<T>)]
T mycos(T x);

Expand Down

0 comments on commit 64db7e8

Please sign in to comment.