EXSWCPHIPT-42: Changes to HIP RTC Framework implementation (#2732)
- Removed ifdef from hipTestContext class
- Fix potential race condition in hipTest::launchRTCKernel()
- Improve documentation
- Move moduleUnloading to main() instead of explicitly calling it on every test
- Fix code formating
- Fix segmentation fault caused by using catch2 macro after catch2 is destroyed
[ROCm/hip commit: d46d399976]
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#include <cstdlib>
|
||||
#include <hip_test_common.hh>
|
||||
#include <picojson.h>
|
||||
#include <fstream>
|
||||
@@ -211,7 +212,10 @@ bool TestContext::parseJsonFile() {
|
||||
|
||||
void TestContext::cleanContext() {
|
||||
for (auto& pair : compiledKernels) {
|
||||
REQUIRE(hipSuccess == hipModuleUnload(pair.second.module));
|
||||
hipError_t error = hipModuleUnload(pair.second.module);
|
||||
if (error != hipSuccess) {
|
||||
throw std::runtime_error("Unable to unload rtc module");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,5 +9,8 @@ int main(int argc, char** argv) {
|
||||
std::cout << "HIP_SKIP_THIS_TEST" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
return Catch::Session().run(argc, argv);
|
||||
int out = Catch::Session().run(argc, argv);
|
||||
TestContext::get().cleanContext();
|
||||
return out;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user