Skip to content

Commit

Permalink
Prevent wrapping unsupported version of functions. (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerilk authored Jul 30, 2024
1 parent 9e3fbff commit 7d75979
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cuda/cuda_model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,9 @@ def upper_snake_case(str)
str = <<EOF
const int pt_condition = #{pt_condition};
const int normal_condition = #{normal_condition};
if (_retval == CUDA_SUCCESS && pfn && *pfn) {
if (_retval == CUDA_SUCCESS && cudaVersion > CUDA_VERSION) {
fprintf(stderr, "THAPI: CUDA version %d is unsupported, could not wrap %s symbol\\n", cudaVersion, symbol);
} else if (_retval == CUDA_SUCCESS && pfn && *pfn) {
EOF
str << $cuda_api_versions_yaml.map { |name, suffixes|
suffixes.map { |suffix, versions|
Expand Down

0 comments on commit 7d75979

Please sign in to comment.