Make hipMemset*Async* tests pass in static lib
3 hipMemset*Async* direct tests will crash in static lib because
some hsa objects are not initialized when hip apis call them.
The fix will make the hip apis called in main() so that hsa objects
have been initialized at that stage.
Change-Id: I41eb29b8c2588acac0cd3ae6d96b14fb1abd235a
[ROCm/hip commit: f9726a727d]
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia EXCLUDE_HIP_LIB_TYPE static
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
@@ -31,8 +31,6 @@
|
||||
#define NUM_THREADS 50
|
||||
#define ITER 50
|
||||
|
||||
unsigned blocks = HipTest::setNumBlocks(blocksPerCU, threadsPerBlock, N);
|
||||
|
||||
template <typename T>
|
||||
class MemSetTest {
|
||||
public:
|
||||
@@ -219,6 +217,9 @@ int main() {
|
||||
printf("Queueing up hipMemSetAsync jobs on multiple threads"
|
||||
"and checking results\n");
|
||||
|
||||
unsigned blocks = HipTest::setNumBlocks(blocksPerCU, threadsPerBlock, N);
|
||||
printf("blocks: %u\n", blocks);
|
||||
|
||||
testResult &= testhipMemsetAsyncWithMultiThread();
|
||||
if (!(testResult)) {
|
||||
printf("Thread execution did not complete for hipMemsetAsync\n");
|
||||
|
||||
Reference in New Issue
Block a user