Attempt to enable compute 5.2 for NVIDIA GPU support

Issue #292.
This commit is contained in:
Matt Pharr 2022-08-31 15:57:58 -07:00
parent d4f5a4a43f
commit accfbcba62
2 changed files with 2 additions and 2 deletions

View file

@ -5,7 +5,7 @@
int main(int argc, char **argv){ int main(int argc, char **argv){
cudaDeviceProp dP; cudaDeviceProp dP;
float min_cc = 5.3; // We need half floats... float min_cc = 5.2;
int rc = cudaGetDeviceProperties(&dP, 0); int rc = cudaGetDeviceProperties(&dP, 0);
if(rc != cudaSuccess) { if(rc != cudaSuccess) {

View file

@ -499,7 +499,7 @@ class Half {
PBRT_CPU_GPU PBRT_CPU_GPU
bool operator==(const Half &v) const { bool operator==(const Half &v) const {
#ifdef PBRT_IS_GPU_CODE #if defined(PBRT_IS_GPU_CODE) && __CUDA_ARCH__ >= 530
return __ushort_as_half(h) == __ushort_as_half(v.h); return __ushort_as_half(h) == __ushort_as_half(v.h);
#else #else
if (Bits() == v.Bits()) if (Bits() == v.Bits())