-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Enable complex autograd for index
, add index
and index_put
OpInfos
#54562
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
💊 CI failures summary and remediationsAs of commit a8996ec (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions to the (internal) Dr. CI Users group. |
b0ec1a7
to
d605e4d
Compare
d605e4d
to
34fa046
Compare
supports_inplace_autograd=True, | ||
sample_inputs_func=sample_inputs_index_put, | ||
skips=( | ||
SkipInfo('TestCommon', 'test_variant_consistency_jit'), |
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.
why is this test being skipped? if it's intentionally skipped due to a test failure, could you share the error message or the reason why it's failing?
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.
Yeah there's a failure that I don't understand yet:
click to expand
======================================================================
ERROR: test_variant_consistency_jit_index_put_cpu_float32 (__main__.TestCommonCPU)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/work2/kurtamohler/development/pytorch-index_put-complex-autograd/torch/testing/_internal/common_device_type.py", line 297, in instantiated_test
raise rte
File "/work2/kurtamohler/development/pytorch-index_put-complex-autograd/torch/testing/_internal/common_device_type.py", line 292, in instantiated_test
result = test_fn(self, *args)
File "/work2/kurtamohler/development/pytorch-index_put-complex-autograd/torch/testing/_internal/common_device_type.py", line 266, in test_wrapper
return test(*args, **kwargs)
File "/work2/kurtamohler/development/pytorch-index_put-complex-autograd/test/test_ops.py", line 294, in test_variant_consistency_jit
check_against_reference(self,
File "/work2/kurtamohler/development/pytorch-index_put-complex-autograd/torch/testing/_internal/common_jit.py", line 63, in check_against_reference
outputs_test = self.runAndSaveRNG(func, nograd_inputs, kwargs)
File "/work2/kurtamohler/development/pytorch-index_put-complex-autograd/torch/testing/_internal/common_jit.py", line 130, in runAndSaveRNG
results = func(*inputs, **kwargs)
File "/work2/kurtamohler/development/pytorch-index_put-complex-autograd/torch/testing/_internal/jit_metaprogramming_utils.py", line 301, in script_fn
fn, tensors = gen_script_fn_and_args(method_name, func_type, *args, **kwargs)
File "/work2/kurtamohler/development/pytorch-index_put-complex-autograd/torch/testing/_internal/jit_metaprogramming_utils.py", line 292, in gen_script_fn_and_args
CU = torch.jit.CompilationUnit(script)
RuntimeError:
undefined value tensor:
File "<string>", line 3
def the_method(i0, i1):
return torch.index_put(i0, (tensor([4, 4]),), i1, accumulate=False)
Seems like it must be an existing issue that this PR did not introduce, but I could look into it anyway
supports_inplace_autograd=False, | ||
op=torch.Tensor.__getitem__, | ||
sample_inputs_func=sample_inputs_getitem, | ||
skips=(SkipInfo('TestCommon', 'test_variant_consistency_jit'),)), |
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.
same comment as below
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.
This is the failure for this one:
click to expand
======================================================================
ERROR: test_variant_consistency_jit_index_put_cuda_float32 (__main__.TestCommonCUDA)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/work2/kurtamohler/development/pytorch-index_put-complex-autograd/torch/testing/_internal/common_utils.py", line 955, in wrapper
method(*args, **kwargs)
File "/work2/kurtamohler/development/pytorch-index_put-complex-autograd/torch/testing/_internal/common_utils.py", line 955, in wrapper
method(*args, **kwargs)
File "/work2/kurtamohler/development/pytorch-index_put-complex-autograd/torch/testing/_internal/common_device_type.py", line 297, in instantiated_test
raise rte
File "/work2/kurtamohler/development/pytorch-index_put-complex-autograd/torch/testing/_internal/common_device_type.py", line 292, in instantiated_test
result = test_fn(self, *args)
File "/work2/kurtamohler/development/pytorch-index_put-complex-autograd/torch/testing/_internal/common_device_type.py", line 266, in test_wrapper
return test(*args, **kwargs)
File "/work2/kurtamohler/development/pytorch-index_put-complex-autograd/test/test_ops.py", line 294, in test_variant_consistency_jit
check_against_reference(self,
File "/work2/kurtamohler/development/pytorch-index_put-complex-autograd/torch/testing/_internal/common_jit.py", line 63, in check_against_reference
outputs_test = self.runAndSaveRNG(func, nograd_inputs, kwargs)
File "/work2/kurtamohler/development/pytorch-index_put-complex-autograd/torch/testing/_internal/common_jit.py", line 130, in runAndSaveRNG
results = func(*inputs, **kwargs)
File "/work2/kurtamohler/development/pytorch-index_put-complex-autograd/torch/testing/_internal/jit_metaprogramming_utils.py", line 301, in script_fn
fn, tensors = gen_script_fn_and_args(method_name, func_type, *args, **kwargs)
File "/work2/kurtamohler/development/pytorch-index_put-complex-autograd/torch/testing/_internal/jit_metaprogramming_utils.py", line 292, in gen_script_fn_and_args
CU = torch.jit.CompilationUnit(script)
RuntimeError:
undefined value tensor:
File "<string>", line 3
def the_method(i0, i1):
return torch.index_put(i0, (tensor([0, 1], device='cuda:0'),), i1, accumulate=False)
~~~~~~ <--- HERE
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 idea how to fix this off the top of my head. let's follow up on this in a separate issue/subsequent PR?
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.
@kurtamohler did you get a chance to look into this?
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.
thanks @kurtamohler ! This PR lgtm overall. I just have one question regarding the skip, but besides that this PR is ready to be merged.
@anjali411 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
@kurtamohler could you please rebase? |
Codecov Report
@@ Coverage Diff @@
## master #54562 +/- ##
==========================================
- Coverage 77.45% 77.45% -0.01%
==========================================
Files 1894 1893 -1
Lines 186401 186105 -296
==========================================
- Hits 144377 144143 -234
+ Misses 42024 41962 -62 |
@anjali411 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
@kurtamohler looks like another PR went in before this one. needs another rebase! |
@anjali411, rebase done |
@anjali411 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
@anjali411 merged this pull request in 49b07ac. |
Fixes #53605