diff options
author | Tyler Sorensen <tylersorensen3221@hotmail.com> | 2018-07-11 15:12:22 -0400 |
---|---|---|
committer | Tyler Sorensen <tylersorensen3221@hotmail.com> | 2018-07-11 15:12:22 -0400 |
commit | 7f2e98a1406da6c5293f0c988df95edc246ef88d (patch) | |
tree | 5fdb94393d54cff495f7f2e6a2f0edc6df1eebd8 /src/clpp11.hpp | |
parent | 7bae54f61f8a2b589421afd57c9da6c8775155ef (diff) |
added inline ptx to support shuffle on Nvidia GPUs
Diffstat (limited to 'src/clpp11.hpp')
-rw-r--r-- | src/clpp11.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/clpp11.hpp b/src/clpp11.hpp index 8d6a1127..690f8c49 100644 --- a/src/clpp11.hpp +++ b/src/clpp11.hpp @@ -44,6 +44,7 @@ #include <numeric> // std::accumulate #include <cstring> // std::strlen #include <cstdio> // fprintf, stderr +#include "assert.h" // OpenCL #define CL_USE_DEPRECATED_OPENCL_1_1_APIS // to disable deprecation warnings @@ -355,6 +356,12 @@ class Device { std::string{"."} + std::to_string(GetInfo<cl_uint>(CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV)); } + // Returns if the Nvidia chip is a Volta or later archicture (sm_70 or higher) + bool IsPostNVIDIAVolta() const { + assert(HasExtension("cl_nv_device_attribute_query")); + return GetInfo<cl_uint>(CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV) >= 7; + } + // Retrieves the above extra information (if present) std::string GetExtraInfo() const { if (HasExtension("cl_amd_device_attribute_query")) { return AMDBoardName(); } |