Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Add sm selectors for 87
Browse files Browse the repository at this point in the history
  • Loading branch information
wmaxey committed Oct 22, 2021
1 parent 8e8ffb8 commit deed8b1
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions include/nv/target
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,13 @@ namespace nv {
constexpr base_int_t sm_75_bit = 1 << 11;
constexpr base_int_t sm_80_bit = 1 << 12;
constexpr base_int_t sm_86_bit = 1 << 13;
constexpr base_int_t sm_87_bit = 1 << 13;
constexpr base_int_t all_devices =
sm_35_bit | sm_37_bit |
sm_50_bit | sm_52_bit | sm_53_bit |
sm_60_bit | sm_61_bit | sm_62_bit |
sm_70_bit | sm_72_bit | sm_75_bit |
sm_80_bit | sm_86_bit;
sm_80_bit | sm_86_bit | sm_87_bit;

// Store a set of targets as a set of bits
struct _NV_BITSET_ATTRIBUTE target_description {
Expand All @@ -82,7 +83,7 @@ namespace nv {
sm_50 = 50, sm_52 = 52, sm_53 = 53,
sm_60 = 60, sm_61 = 61, sm_62 = 62,
sm_70 = 70, sm_72 = 72, sm_75 = 75,
sm_80 = 80, sm_86 = 86,
sm_80 = 80, sm_86 = 86, sm_87 = 87,
};
_NV_FUNCTION_ANNOTATION
constexpr base_int_t toint(sm_selector a) {
Expand All @@ -102,11 +103,13 @@ namespace nv {
toint(a) == 72 ? sm_72_bit :
toint(a) == 75 ? sm_75_bit :
toint(a) == 80 ? sm_80_bit :
toint(a) == 86 ? sm_86_bit : 0;
toint(a) == 86 ? sm_86_bit :
toint(a) == 87 ? sm_87_bit : 0;
}
_NV_FUNCTION_ANNOTATION
constexpr base_int_t bitrounddown(sm_selector a) {
return toint(a) >= 86 ? sm_86_bit :
return toint(a) >= 87 ? sm_87_bit :
toint(a) >= 86 ? sm_86_bit :
toint(a) >= 80 ? sm_80_bit :
toint(a) >= 75 ? sm_75_bit :
toint(a) >= 72 ? sm_72_bit :
Expand Down Expand Up @@ -180,6 +183,7 @@ namespace nv {
constexpr sm_selector sm_75 = sm_selector::sm_75;
constexpr sm_selector sm_80 = sm_selector::sm_80;
constexpr sm_selector sm_86 = sm_selector::sm_86;
constexpr sm_selector sm_87 = sm_selector::sm_87;

using detail::is_exactly;
using detail::provides;
Expand Down

0 comments on commit deed8b1

Please sign in to comment.