Handle special cases when stream value is hipStreamLegacy (0x01) or hipStreamPerThread (0x02) (#343)

* Updated stream code to handle special cases when stream value is 0x01 or 0x02

* Removed extra definitions and updated tests to account for special case

* Modified stream.cpp so that each thread assigned a unique stream ID when hipStreamPerThread is used as stream value. Modified tests to check that threads are assigned unique, repeated values when hipStreamPerThread is called

* Updated idx_offset, stream_map, and thread counter to be in one struct.

* Update stream.cpp to only use add_stream() and update tests for seperate unit test for hipStreamPerThread

* Remove unecessary comment

* Removed unecessary line

* Updated tests and stream.cpp to update stream ID correctly

* Updated test structure
This commit is contained in:
itrowbri
2025-08-27 20:04:13 -05:00
zatwierdzone przez GitHub
rodzic 9aaad2017b
commit 4d98a0169f
15 zmienionych plików z 572 dodań i 15 usunięć
@@ -110,6 +110,9 @@ main()
const int gridSizePerStream = 104; //(int)ceil((float)elements_per_stream/blockSize);
HIP_ASSERT(hipEventRecord(start));
// Extra copy with null stream
HIP_ASSERT(hipMemcpyAsync(
&d_input1[0], &h_input1[0], bytes_per_stream, hipMemcpyHostToDevice, nullptr));
// split H2D copies and kernel calls into separate loops
for(int i = 0; i < num_streams; i++)
{