Skip to content

Commit cb02830

Browse files
Fix: Wrong handle in multi-stream handle test (#186)
The multi-stream handle test failed flakily on a recent CI run on `main`: https://github.com/iree-org/fusilli/actions/runs/22334529677/job/64623964052 ``` ------------------------------------------------------------------------------- Handle creation with stream and deviceId Create multiple handles with different HIP streams ------------------------------------------------------------------------------- /workspace/tests/hip_tests/test_handle.cpp:92 ............................................................................... /workspace/tests/hip_tests/test_handle.cpp:136: FAILED: REQUIRE( readData == hostData ) with expansion: { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0. 0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f } == { 3.14f, 3.14f, 3.14f, 3.14f, 3.14f, 3.14f, 3.14f, 3.14f, 3.14f, 3.14f, 3. 14f, 3.14f, 3.14f, 3.14f, 3.14f, 3.14f, 3.14f, 3.14f, 3.14f, 3.14f, 3.14f, 3. 14f, 3.14f, 3.14f, 3.14f, 3.14f, 3.14f, 3.14f, 3.14f, 3.14f, 3.14f, 3.14f } terminate called after throwing an instance of 'std::bad_variant_access' what(): std::get: wrong index for variant /workspace/tests/hip_tests/test_handle.cpp:136: FAILED: {Unknown expression after the reported line} due to a fatal error condition: SIGABRT - Abort (abnormal termination) signal ``` - Fixed copy-paste bug in `test_handle.cpp` where the "Create multiple handles with different HIP streams" test was using `handle1` instead of `handle2` for the second buffer's `allocate` and `read` calls - (I'm not sure if this is accurate) This could have caused a cross-stream race condition resulting in flaky D2H reads returning all zeros instead of the expected `3.14f` values 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Sambhav Jain <sambhav@alumni.stanford.edu> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3560d7e commit cb02830

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/hip_tests/test_handle.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ TEST_CASE("Handle creation with stream and deviceId", "[handle][hip_tests]") {
130130

131131
// Verify we can allocate, write, and read buffers on handle2
132132
FUSILLI_REQUIRE_ASSIGN(Buffer deviceBuffer2,
133-
Buffer::allocate(handle1, bufferShape, hostData));
133+
Buffer::allocate(handle2, bufferShape, hostData));
134134
readData.clear();
135-
FUSILLI_REQUIRE_OK(deviceBuffer2.read(handle1, readData));
135+
FUSILLI_REQUIRE_OK(deviceBuffer2.read(handle2, readData));
136136
REQUIRE(readData == hostData);
137137

138138
// Clean up.

0 commit comments

Comments
 (0)