-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for sm_90a in <nv/target> API #1270
Comments
The current behavior of It would confusing when NV_DISPATCH_TARGET(
NV_IS_EXACTLY_SM_90, (...),
NV_IS_EXACTLY_SM_90a, (/* this will never run */),
) The proposal by @dkolsen-pgi to therefore change the syntax for checking for architecture specific features makes a lot of sense. It would introduce the NV_DISPATCH_TARGET(
NV_IS_EXACTLY_SM_90, (...),
NV_HAS_FEATURE_SM_90a, (/* this will still not run */),
)
// The fix is to reorder the dispatch targets:
NV_DISPATCH_TARGET(
NV_HAS_FEATURE_SM_90a, (/* this will run on -arch sm90a */),
NV_IS_EXACTLY_SM_90, (/* this will run on -arch sm90 */),
) As noted in internal discussion by @wmaxey, the Tagging @gonzalobg |
One thing that I see coming up is that a feature is arch-specific in multiple architectures (I can name at least one PTX instruction). To use this feature, I don't want to do: NV_DISPATCH_TARGET(
NV_HAS_FEATURE_SM_90a, (/* Code block X. This will run on -arch sm90a */),
NV_HAS_FEATURE_SM_100a, (/* Repeat of code block X. This will run on -arch sm100a */),
NV_PROVIDES_SM_90, (/* Code block Y. This will run on -arch sm90 and -arch sm100 */),
) It would be great if we could have something like this: NV_DISPATCH_TARGET(
NV_HAS_FEATURE_SM_90a || NV_HAS_FEATURE_SM_100a, (
/* Code block X. This will run on -arch sm90a and on -arch sm100a */
),
NV_PROVIDES_SM_90, (/* Code block Y. This will run on -arch sm90 and -arch sm100 */),
) |
Summary:
Currently, <nv/target> does not support sm_90a. The problem with sm_90a is not its non-numeric nature but the fact that it includes features that might not be supported in future architectures, which breaks the assumptions <nv/target> was built around. Adding support for sm_90a would require a significant redesign of the API.
Requested Feature:
<nv/target> should supported sm_90a.
It's important to differentiate between numerical architecture values and feature-specific checks.
Suggestions include introducing new macros like
NV_HAS_FEATURE_SM90A
orNV_HAS_FEATURE_SM100FOO
for feature-specific checks.The goal is to make it clear and meaningful when writing code for specific architectures and their features.
Next Steps:
The text was updated successfully, but these errors were encountered: