diff options
Diffstat (limited to 'tests/autodiff/reverse-loop-checkpoint-test.slang')
| -rw-r--r-- | tests/autodiff/reverse-loop-checkpoint-test.slang | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/autodiff/reverse-loop-checkpoint-test.slang b/tests/autodiff/reverse-loop-checkpoint-test.slang index fc206e128..68ad823ac 100644 --- a/tests/autodiff/reverse-loop-checkpoint-test.slang +++ b/tests/autodiff/reverse-loop-checkpoint-test.slang @@ -1,5 +1,6 @@ //TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj -output-using-type //TEST:SIMPLE(filecheck=CHECK): -target hlsl -profile cs_5_0 -entry computeMain -line-directive-mode none +//TEST:SIMPLE(filecheck=CHK):-target glsl -stage compute -entry computeMain -report-checkpoint-intermediates //TEST_INPUT:ubuffer(data=[0 0 0 0 0], stride=4):out,name=outputBuffer RWStructuredBuffer<float> outputBuffer; @@ -44,13 +45,18 @@ float3 infinitesimal(float3 x) return x - detach(x); } +//CHK: note: checkpointing context of 20 bytes associated with function: 'computeLoop' [BackwardDifferentiable] [PreferRecompute] float3 computeLoop(float y) { + //CHK: note: 4 bytes (float) used to checkpoint the following item: float w = 0; + + //CHK: note: 12 bytes (Vector<float, 3> ) used to checkpoint the following item: float3 w3 = float3(0, 0, 0); + //CHK: note: 4 bytes (int32_t) used for a loop counter here: for (int i = 0; i < 8; i++) { float k = compute(i, y); @@ -93,3 +99,5 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) outputBuffer[2] = computeLoop(1.0).x; } + +//CHK-NOT: note
\ No newline at end of file |
