SWDEV-319818 - Release restriction on hipResourceViewDesc

Let more types support hipResourceViewDesc.
Add missing symbols to fix cuda build failing.

Change-Id: Ife694cc6491427093863252e257e820b0bb4fa0f


[ROCm/clr commit: a19b767e8a]
This commit is contained in:
Tao Sang
2022-05-09 17:42:24 -04:00
committed by Tao Sang
orang tua b53cb9e585
melakukan 1a9a5f9bfc
2 mengubah file dengan 38 tambahan dan 3 penghapusan
@@ -281,6 +281,43 @@ typedef enum cudaMemRangeAttribute hipMemRangeAttribute;
//
// hipErrorNoDevice.
// hipResourceViewFormat
typedef enum cudaResourceViewFormat hipResourceViewFormat;
#define hipResViewFormatNone cudaResViewFormatNone
#define hipResViewFormatUnsignedChar1 cudaResViewFormatUnsignedChar1
#define hipResViewFormatUnsignedChar2 cudaResViewFormatUnsignedChar2
#define hipResViewFormatUnsignedChar4 cudaResViewFormatUnsignedChar4
#define hipResViewFormatSignedChar1 cudaResViewFormatSignedChar1
#define hipResViewFormatSignedChar2 cudaResViewFormatSignedChar2
#define hipResViewFormatSignedChar4 cudaResViewFormatSignedChar4
#define hipResViewFormatUnsignedShort1 cudaResViewFormatUnsignedShort1
#define hipResViewFormatUnsignedShort2 cudaResViewFormatUnsignedShort2
#define hipResViewFormatUnsignedShort4 cudaResViewFormatUnsignedShort4
#define hipResViewFormatSignedShort1 cudaResViewFormatSignedShort1
#define hipResViewFormatSignedShort2 cudaResViewFormatSignedShort2
#define hipResViewFormatSignedShort4 cudaResViewFormatSignedShort4
#define hipResViewFormatUnsignedInt1 cudaResViewFormatUnsignedInt1
#define hipResViewFormatUnsignedInt2 cudaResViewFormatUnsignedInt2
#define hipResViewFormatUnsignedInt4 cudaResViewFormatUnsignedInt4
#define hipResViewFormatSignedInt1 cudaResViewFormatSignedInt1
#define hipResViewFormatSignedInt2 cudaResViewFormatSignedInt2
#define hipResViewFormatSignedInt4 cudaResViewFormatSignedInt4
#define hipResViewFormatHalf1 cudaResViewFormatHalf1
#define hipResViewFormatHalf2 cudaResViewFormatHalf2
#define hipResViewFormatHalf4 cudaResViewFormatHalf4
#define hipResViewFormatFloat1 cudaResViewFormatFloat1
#define hipResViewFormatFloat2 cudaResViewFormatFloat2
#define hipResViewFormatFloat4 cudaResViewFormatFloat4
#define hipResViewFormatUnsignedBlockCompressed1 cudaResViewFormatUnsignedBlockCompressed1
#define hipResViewFormatUnsignedBlockCompressed2 cudaResViewFormatUnsignedBlockCompressed2
#define hipResViewFormatUnsignedBlockCompressed3 cudaResViewFormatUnsignedBlockCompressed3
#define hipResViewFormatUnsignedBlockCompressed4 cudaResViewFormatUnsignedBlockCompressed4
#define hipResViewFormatSignedBlockCompressed4 cudaResViewFormatSignedBlockCompressed4
#define hipResViewFormatUnsignedBlockCompressed5 cudaResViewFormatUnsignedBlockCompressed5
#define hipResViewFormatSignedBlockCompressed5 cudaResViewFormatSignedBlockCompressed5
#define hipResViewFormatUnsignedBlockCompressed6H cudaResViewFormatUnsignedBlockCompressed6H
#define hipResViewFormatSignedBlockCompressed6H cudaResViewFormatSignedBlockCompressed6H
#define hipResViewFormatUnsignedBlockCompressed7 cudaResViewFormatUnsignedBlockCompressed7
//! Flags that can be used with hipEventCreateWithFlags:
#define hipEventDefault cudaEventDefault
+1 -3
Melihat File
@@ -88,9 +88,7 @@ hipError_t ihipCreateTextureObject(hipTextureObject_t* pTexObject,
return hipErrorInvalidValue;
}
// pResViewDesc can only be specified if the type of resource is a HIP array or a HIP mipmapped array.
if ((pResViewDesc != nullptr) &&
((pResDesc->resType != hipResourceTypeArray) && (pResDesc->resType != hipResourceTypeMipmappedArray))) {
if (pResViewDesc != nullptr && pResDesc->resType == hipResourceTypeLinear) {
return hipErrorInvalidValue;
}