SWDEV-305992 - Improve texture tests (#2646)
Enable more texture supports for hip-rocclr.
Skip texture tests on device that doesn't support images.
SWDEV-322257 - Fix issues of image tests skipped on
NVidia devices.
Change-Id: Ia99d06b1e97fc945f1b740e47710f4dcd70f38ca
[ROCm/hip-tests commit: 70ccfa39ad]
This commit is contained in:
committed by
GitHub
parent
7253d79db9
commit
e17423a24e
@@ -115,4 +115,22 @@ static inline int RAND_R(unsigned* rand_seed)
|
||||
return rand_r(rand_seed);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline bool isImageSupported() {
|
||||
int imageSupport = 1;
|
||||
#ifdef __HIP_PLATFORM_AMD__
|
||||
int device;
|
||||
HIP_CHECK(hipGetDevice(&device));
|
||||
HIPCHECK(hipDeviceGetAttribute(&imageSupport, hipDeviceAttributeImageSupport,
|
||||
device));
|
||||
#endif
|
||||
return imageSupport != 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// This must be called in the beginning of image test app's main() to indicate whether image
|
||||
// is supported.
|
||||
#define checkImageSupport() \
|
||||
if (!HipTest::isImageSupported()) \
|
||||
{ printf("Texture is not support on the device. Skipped.\n"); return; }
|
||||
|
||||
Reference in New Issue
Block a user