SWDEV-236178 - Remove __hip_pinned_shadow reference from dtests and add hipModuleUnload for all corresponding hipModuleLoad calls.
Change-Id: I405789b430ffbb8fccda1cebdb5d18e83a85c926
This commit is contained in:
committed by
Karthik Jayaprakash
vanhempi
00301b1665
commit
0dd6123998
@@ -127,6 +127,7 @@ int main()
|
||||
HIPCHECK(hipFree(Ad));
|
||||
HIPCHECK(hipFree(Bd));
|
||||
HIPCHECK(hipHostFree(C));
|
||||
HIPCHECK(hipModuleUnload(Module));
|
||||
if(testStatus)
|
||||
passed();
|
||||
}
|
||||
|
||||
Regular → Executable
@@ -153,6 +153,7 @@ int main() {
|
||||
};
|
||||
}
|
||||
|
||||
HIP_CHECK(hipModuleUnload(Module));
|
||||
hipCtxDestroy(context);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Regular → Executable
@@ -49,6 +49,7 @@ int main(int argc, char* argv[]) {
|
||||
assert(gridSize != 0 && blockSize != 0);
|
||||
HIPCHECK(hipModuleOccupancyMaxActiveBlocksPerMultiprocessor(&numBlock, Function, blockSize, 0));
|
||||
assert(numBlock != 0);
|
||||
HIPCHECK(hipModuleUnload(Module));
|
||||
HIPCHECK(hipCtxDestroy(context));
|
||||
passed();
|
||||
}
|
||||
|
||||
Regular → Executable
+2
-3
@@ -21,6 +21,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD_CMD: tex2d_kernel.code %hc --genco %S/tex2d_kernel.cpp -o tex2d_kernel.code
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc rocclr
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
@@ -33,9 +34,6 @@ THE SOFTWARE.
|
||||
|
||||
#define fileName "tex2d_kernel.code"
|
||||
|
||||
#if __HIP__
|
||||
__hip_pinned_shadow__
|
||||
#endif
|
||||
texture<float, 2, hipReadModeElementType> tex;
|
||||
bool testResult = false;
|
||||
|
||||
@@ -133,6 +131,7 @@ bool runTest(int argc, char** argv) {
|
||||
}
|
||||
hipFree(dData);
|
||||
hipFreeArray(array);
|
||||
HIP_CHECK(hipModuleUnload(Module));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Regular → Executable
+1
-4
@@ -27,10 +27,7 @@ THE SOFTWARE.
|
||||
|
||||
#include "hip/hip_runtime.h"
|
||||
|
||||
#if __HIP__
|
||||
__hip_pinned_shadow__
|
||||
#endif
|
||||
extern texture<float, 2, hipReadModeElementType> tex;
|
||||
texture<float, 2, hipReadModeElementType> tex;
|
||||
|
||||
extern "C" __global__ void tex2dKernel(float* outputData, int width, int height) {
|
||||
int x = hipBlockIdx_x * hipBlockDim_x + hipThreadIdx_x;
|
||||
|
||||
Viittaa uudesa ongelmassa
Block a user