Fix gcc build on NVCC path (#1661)
* Fix gcc build on NVCC path
* Fix CI build errors
* [dtest] Fix texture and surface obj2D tests
[ROCm/hip commit: e39d7497ec]
This commit is contained in:
committed by
Maneesh Gupta
parent
05ef9bd386
commit
ecdba45d29
@@ -18,8 +18,10 @@
|
||||
* */
|
||||
|
||||
/* HIT_START
|
||||
* BUILD_CMD: hipMalloc %cc -D__HIP_PLATFORM_HCC__ -I%hip-path/include %S/%s -Wl,--rpath=%hip-path/lib %hip-path/lib/libhip_hcc.so -o %T/%t EXCLUDE_HIP_PLATFORM nvcc
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM nvcc
|
||||
* BUILD_CMD: hipMalloc %cc -D__HIP_PLATFORM_NVCC__ -I%hip-path/include -I/usr/local/cuda/include %S/%s -o %T/hipMalloc_nv -L/usr/local/cuda/lib64 -lcudart EXCLUDE_HIP_PLATFORM hcc
|
||||
* BUILD_CMD: hipMalloc %cc -D__HIP_PLATFORM_HCC__ -I%hip-path/include %S/%s -Wl,--rpath=%hip-path/lib %hip-path/lib/libhip_hcc.so -o %T/hipMalloc_hcc EXCLUDE_HIP_PLATFORM nvcc
|
||||
* TEST: hipMalloc_nv EXCLUDE_HIP_PLATFORM hcc
|
||||
* TEST: hipMalloc_hcc EXCLUDE_HIP_PLATFORM nvcc
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ int runTest(int argc, char** argv) {
|
||||
|
||||
hipMemcpyToArray(hipArray, 0, 0, hData, size, hipMemcpyHostToDevice);
|
||||
|
||||
struct hipResourceDesc resDesc;
|
||||
hipResourceDesc resDesc;
|
||||
memset(&resDesc, 0, sizeof(resDesc));
|
||||
resDesc.resType = hipResourceTypeArray;
|
||||
resDesc.res.array.array = hipArray;
|
||||
@@ -62,7 +62,7 @@ int runTest(int argc, char** argv) {
|
||||
hipCreateSurfaceObject(&surfaceObject, &resDesc);
|
||||
|
||||
hipMallocArray(&hipOutArray, &channelDesc, width, height);
|
||||
struct hipResourceDesc resOutDesc;
|
||||
hipResourceDesc resOutDesc;
|
||||
memset(&resOutDesc, 0, sizeof(resOutDesc));
|
||||
resOutDesc.resType = hipResourceTypeArray;
|
||||
resOutDesc.res.array.array = hipOutArray;
|
||||
|
||||
@@ -53,13 +53,13 @@ int runTest(int argc, char** argv) {
|
||||
|
||||
hipMemcpyToArray(hipArray, 0, 0, hData, size, hipMemcpyHostToDevice);
|
||||
|
||||
struct hipResourceDesc resDesc;
|
||||
hipResourceDesc resDesc;
|
||||
memset(&resDesc, 0, sizeof(resDesc));
|
||||
resDesc.resType = hipResourceTypeArray;
|
||||
resDesc.res.array.array = hipArray;
|
||||
|
||||
// Specify texture object parameters
|
||||
struct hipTextureDesc texDesc;
|
||||
hipTextureDesc texDesc;
|
||||
memset(&texDesc, 0, sizeof(texDesc));
|
||||
texDesc.addressMode[0] = hipAddressModeWrap;
|
||||
texDesc.addressMode[1] = hipAddressModeWrap;
|
||||
|
||||
Reference in New Issue
Block a user