SWDEV-401850 - Fix hipCreateChannelDescHalf APIs
- Address ChannelDescHalf1 and ChannelDescHalf2 APIs not returning
correct Channel Descriptors in amd headers
- Add missing hipCreateChannelDescHalf APIs in nvidia headers
Change-Id: I558847425c2459d3cde329ca2e926d882bb0a9dd
[ROCm/clr commit: 586731c2cc]
This commit is contained in:
@@ -44,7 +44,12 @@ static inline hipChannelFormatDesc hipCreateChannelDescHalf1() {
|
|||||||
|
|
||||||
static inline hipChannelFormatDesc hipCreateChannelDescHalf2() {
|
static inline hipChannelFormatDesc hipCreateChannelDescHalf2() {
|
||||||
int e = (int)sizeof(unsigned short) * 8;
|
int e = (int)sizeof(unsigned short) * 8;
|
||||||
return hipCreateChannelDesc(e, 0, 0, 0, hipChannelFormatKindFloat);
|
return hipCreateChannelDesc(e, e, 0, 0, hipChannelFormatKindFloat);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline hipChannelFormatDesc hipCreateChannelDescHalf4() {
|
||||||
|
int e = (int)sizeof(unsigned short) * 8;
|
||||||
|
return hipCreateChannelDesc(e, e, e, e, hipChannelFormatKindFloat);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
|||||||
@@ -2809,6 +2809,26 @@ inline static hipChannelFormatDesc hipCreateChannelDesc(int x, int y, int z, int
|
|||||||
return cudaCreateChannelDesc(x, y, z, w, hipChannelFormatKindToCudaChannelFormatKind(f));
|
return cudaCreateChannelDesc(x, y, z, w, hipChannelFormatKindToCudaChannelFormatKind(f));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline static hipChannelFormatDesc hipCreateChannelDescHalf() {
|
||||||
|
int e = (int)sizeof(unsigned short) * 8;
|
||||||
|
return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindFloat);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline static hipChannelFormatDesc hipCreateChannelDescHalf1() {
|
||||||
|
int e = (int)sizeof(unsigned short) * 8;
|
||||||
|
return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindFloat);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline static hipChannelFormatDesc hipCreateChannelDescHalf2() {
|
||||||
|
int e = (int)sizeof(unsigned short) * 8;
|
||||||
|
return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindFloat);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline static hipChannelFormatDesc hipCreateChannelDescHalf4() {
|
||||||
|
int e = (int)sizeof(unsigned short) * 8;
|
||||||
|
return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindFloat);
|
||||||
|
}
|
||||||
|
|
||||||
inline static hipError_t hipCreateTextureObject(hipTextureObject_t* pTexObject,
|
inline static hipError_t hipCreateTextureObject(hipTextureObject_t* pTexObject,
|
||||||
const hipResourceDesc* pResDesc,
|
const hipResourceDesc* pResDesc,
|
||||||
const hipTextureDesc* pTexDesc,
|
const hipTextureDesc* pTexDesc,
|
||||||
|
|||||||
Reference in New Issue
Block a user