-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Mark IntList as deprecated; add C10_DEPRECATED_USING #16824
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
Conversation
Differential Revision: D13978429 Differential Version: 71266126
What to use instead of the IntList? @ezyang |
IntArrayRef! |
Differential Revision: D13978429 Differential Version: 71704832
#define C10_DEPRECATED(function) function | ||
#endif // defined(__GNUC__) | ||
#endif // defined(__cplusplus) && __cplusplus > 201402L | ||
# warning "You need to implement C10_DEPRECATED_USING for this compiler" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't quite follow all the cases...are we actually using this? Is it crazy to make this an error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't make it an error... everything will "work" in this case, the user will just not get deprecated warnings. Better not break the build for no good reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about the first question? Is this actually used in any of our builds?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this shouldn't be exercised by any of our builds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with this if you want to land it, but also have an alternative proposal for you to consider:
Have no split between C10_DEPRECATED
and C10_DEPRECATED_USING
, but disable C10_DEPRECATED
on nvcc. That disables it for a few more cases than your proposal, but makes it easier to use. Also, disabling this in nvcc probably doesn't matter too much because the same code is run through non-nvcc and will show warnings there anyhow.
@smessmer Your suggestion is reasonable, but I don't want to turn off nvcc support entirely, since that means that we will not get deprecated warnings for any |
Summary: Pull Request resolved: pytorch/pytorch#16824 There was a big wooly yak getting the deprecated macros to work. Gory details are in Deprecated.h Reviewed By: smessmer Differential Revision: D13978429 fbshipit-source-id: f148e5935ac36eacc481789d22c7a9443164fe95
Stack:
:black_circle: #16824 Mark IntList as deprecated; add C10_DEPRECATED_USING 💛
There was a big wooly yak getting the deprecated macros to work.
Gory details are in Deprecated.h
Differential Revision: D13978429