From 8ff34620fb3414ad478e0eae68080629fb0c8144 Mon Sep 17 00:00:00 2001 From: Wenkai Du Date: Thu, 18 Apr 2019 10:34:55 -0700 Subject: [PATCH] workaround weak symbol issue hcc prints "error: alias must point to a defined variable or function" [ROCm/rccl-tests commit: 4474fe168d5c8b38f56ec2931d093102c74ef3d1] --- projects/rccl-tests/src/all_gather.cu | 6 ++---- projects/rccl-tests/src/all_reduce.cu | 6 ++---- projects/rccl-tests/src/broadcast.cu | 6 ++---- projects/rccl-tests/src/reduce.cu | 6 ++---- projects/rccl-tests/src/reduce_scatter.cu | 6 ++---- 5 files changed, 10 insertions(+), 20 deletions(-) diff --git a/projects/rccl-tests/src/all_gather.cu b/projects/rccl-tests/src/all_gather.cu index 45615ccd27..2e6c880160 100644 --- a/projects/rccl-tests/src/all_gather.cu +++ b/projects/rccl-tests/src/all_gather.cu @@ -96,9 +96,7 @@ testResult_t AllGatherRunTest(struct threadArgs* args, int root, ncclDataType_t return testSuccess; } -struct testEngine allGatherEngine = { +struct testEngine ncclTestEngine = { AllGatherGetBuffSize, AllGatherRunTest -}; - -#pragma weak ncclTestEngine=allGatherEngine +}; \ No newline at end of file diff --git a/projects/rccl-tests/src/all_reduce.cu b/projects/rccl-tests/src/all_reduce.cu index 177674085e..acc7c9c69a 100644 --- a/projects/rccl-tests/src/all_reduce.cu +++ b/projects/rccl-tests/src/all_reduce.cu @@ -107,9 +107,7 @@ testResult_t AllReduceRunTest(struct threadArgs* args, int root, ncclDataType_t return testSuccess; } -struct testEngine allReduceEngine = { +struct testEngine ncclTestEngine = { AllReduceGetBuffSize, AllReduceRunTest -}; - -#pragma weak ncclTestEngine=allReduceEngine +}; \ No newline at end of file diff --git a/projects/rccl-tests/src/broadcast.cu b/projects/rccl-tests/src/broadcast.cu index 4119d9eefb..bb29738ee0 100644 --- a/projects/rccl-tests/src/broadcast.cu +++ b/projects/rccl-tests/src/broadcast.cu @@ -113,9 +113,7 @@ testResult_t BroadcastRunTest(struct threadArgs* args, int root, ncclDataType_t return testSuccess; } -struct testEngine broadcastEngine = { +struct testEngine ncclTestEngine = { BroadcastGetBuffSize, BroadcastRunTest -}; - -#pragma weak ncclTestEngine=broadcastEngine +}; \ No newline at end of file diff --git a/projects/rccl-tests/src/reduce.cu b/projects/rccl-tests/src/reduce.cu index 3e9056ad05..541930797b 100644 --- a/projects/rccl-tests/src/reduce.cu +++ b/projects/rccl-tests/src/reduce.cu @@ -116,9 +116,7 @@ testResult_t ReduceRunTest(struct threadArgs* args, int root, ncclDataType_t typ return testSuccess; } -struct testEngine reduceEngine = { +struct testEngine ncclTestEngine = { ReduceGetBuffSize, ReduceRunTest -}; - -#pragma weak ncclTestEngine=reduceEngine +}; \ No newline at end of file diff --git a/projects/rccl-tests/src/reduce_scatter.cu b/projects/rccl-tests/src/reduce_scatter.cu index c466ca284b..10856cc3da 100644 --- a/projects/rccl-tests/src/reduce_scatter.cu +++ b/projects/rccl-tests/src/reduce_scatter.cu @@ -108,9 +108,7 @@ testResult_t ReduceScatterRunTest(struct threadArgs* args, int root, ncclDataTyp return testSuccess; } -struct testEngine reduceScatterEngine = { +struct testEngine ncclTestEngine = { ReduceScatterGetBuffSize, ReduceScatterRunTest -}; - -#pragma weak ncclTestEngine=reduceScatterEngine +}; \ No newline at end of file