diff --git a/projects/hip/include/hip/hip_runtime_api.h b/projects/hip/include/hip/hip_runtime_api.h index e725846cbd..64b2a85d8a 100644 --- a/projects/hip/include/hip/hip_runtime_api.h +++ b/projects/hip/include/hip/hip_runtime_api.h @@ -124,6 +124,7 @@ typedef struct hipDeviceProp_t { unsigned int* hdpRegFlushCntl; ///< Addres of HDP_REG_COHERENCY_FLUSH_CNTL register size_t memPitch; ///memPitch = cdprop.memPitch; p_prop->textureAlignment = cdprop.textureAlignment; + p_prop->texturePitchAlignment = cdprop.texturePitchAlignment; p_prop->kernelExecTimeoutEnabled = cdprop.kernelExecTimeoutEnabled; p_prop->ECCEnabled = cdprop.ECCEnabled; p_prop->tccDriver = cdprop.tccDriver; @@ -1244,6 +1245,9 @@ inline static hipError_t hipDeviceGetAttribute(int* pi, hipDeviceAttribute_t att case hipDeviceAttributeTextureAlignment: cdattr = cudaDevAttrTextureAlignment; break; + case hipDeviceAttributeTexturePitchAlignment: + cdattr = cudaDevAttrTexturePitchAlignment; + break; case hipDeviceAttributeKernelExecTimeout: cdattr = cudaDevAttrKernelExecTimeout; break; diff --git a/projects/hip/src/hip_device.cpp b/projects/hip/src/hip_device.cpp index 403194483a..aa89e62271 100644 --- a/projects/hip/src/hip_device.cpp +++ b/projects/hip/src/hip_device.cpp @@ -312,9 +312,12 @@ hipError_t ihipDeviceGetAttribute(int* pi, hipDeviceAttribute_t attr, int device case hipDeviceAttributeMaxPitch: *pi = prop->memPitch; break; - case hipDeviceAttributeTextureAlignment: + case hipDeviceAttributeTextureAlignment: *pi = prop->textureAlignment; break; + case hipDeviceAttributeTexturePitchAlignment: + *pi = prop->texturePitchAlignment; + break; case hipDeviceAttributeKernelExecTimeout: *pi = prop->kernelExecTimeoutEnabled; break; diff --git a/projects/hip/src/hip_hcc.cpp b/projects/hip/src/hip_hcc.cpp index 63bc8fe14f..175d301ee1 100644 --- a/projects/hip/src/hip_hcc.cpp +++ b/projects/hip/src/hip_hcc.cpp @@ -925,6 +925,7 @@ hipError_t ihipDevice_t::initProperties(hipDeviceProp_t* prop) { prop->memPitch = INT_MAX; //Maximum pitch in bytes allowed by memory copies (hardcoded 128 bytes in hipMallocPitch) prop->textureAlignment = 0; //Alignment requirement for textures + prop->texturePitchAlignment = IMAGE_PITCH_ALIGNMENT; //Alignment requirment for texture pitch prop->kernelExecTimeoutEnabled = 0; //no run time limit for running kernels on device hsa_isa_t isa;