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]
Этот коммит содержится в:
Satyanvesh Dittakavi
2023-05-23 22:01:54 +05:30
родитель babff0ff73
Коммит 094b2bfa9e
2 изменённых файлов: 26 добавлений и 1 удалений
+6 -1
Просмотреть файл
@@ -44,7 +44,12 @@ static inline hipChannelFormatDesc hipCreateChannelDescHalf1() {
static inline hipChannelFormatDesc hipCreateChannelDescHalf2() {
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>
+20
Просмотреть файл
@@ -2809,6 +2809,26 @@ inline static hipChannelFormatDesc hipCreateChannelDesc(int x, int y, int z, int
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,
const hipResourceDesc* pResDesc,
const hipTextureDesc* pTexDesc,