-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Fix btrifact for variables #4318
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
colesbury
left a comment
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.
looks good. can you make sure there's a test that calls btrifact_with_info?
|
Added tests with |
|
Protip: if you want to pretty print the structs, use |
|
This doesn’t change the existing btrifact behavior, except for printing a
deprecate warning if info is used in variable case. So I guess it shouldn’t
break other projects?
…On Fri, Dec 22, 2017 at 15:52 Adam Paszke ***@***.***> wrote:
cc: @bamos <https://github.com/bamos> @zkolter
<https://github.com/zkolter> as this might be breaking for qpth or some
other projects
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4318 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AFaWZcN2d4OkhyAbjLZzaX6v5jt-tKvWks5tDBaegaJpZM4RLTFU>
.
|
|
@pytorchbot retest this please |
|
Not in the short term, but it will be removed at some point |
|
@pytorchbot retest this please |
Fixes #4217
This PR breaks
btrifactintobtrifactandbtrifact_with_info. The cwrap declarations for for tensor and variable are different in that thetensor.btrifactinTensorMath.cwrapstill allowsinfooptional argument, andvar.btrifactinDecalaration.cwrapalways setsinfoas NULL. Invariable.py, a python methodbtrifactis added to support oldinfooptional argument behavior, but I added deprecation warning in favor ofbtrifact_with_info.I also modified
preprocess_declarations.py'sis_nullablefor optional tensor arguments with NULL default values. An example of input declarations is the oldbtrifactinDeclaration.cwrap:, which gets parsed into the following: