Revert "Try to initialize the primary context on cuda"

This reverts commit fd98514113.
Этот коммит содержится в:
Paul
2020-02-11 12:34:11 -06:00
родитель e82e3c2339
Коммит 26bb6a97a7
+1 -7
Просмотреть файл
@@ -18,7 +18,7 @@ THE SOFTWARE.
*/
/* HIT_START
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc
* TEST: %t
* HIT_END
*/
@@ -127,16 +127,10 @@ struct joinable_thread : std::thread
void run_multi_threads(uint32_t n) {
std::vector<ModuleFunction> mf(n);
{
hipDevice_t device;
HIPCHECK(hipDeviceGet(&device, 0));
auto buffer = load_file();
std::vector<joinable_thread> threads;
for (uint32_t i = 0; i < n; i++) {
threads.emplace_back(std::thread{[&, i, buffer] {
hipCtx_t ctx;
HIPCHECK(hipDevicePrimaryCtxRetain(&ctx, device));
mf[i] = load(buffer);
}});
}