Skip to content
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

[opinfo] nn.functional.pad #62814

Closed

Conversation

kshitij12345
Copy link
Collaborator

@kshitij12345 kshitij12345 commented Aug 5, 2021

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Aug 5, 2021

🔗 Helpful links

💊 CI failures summary and remediations

As of commit 987a094 (more details on the Dr. CI page):


  • 3/3 failures possibly* introduced in this PR
    • 1/3 non-scanned failure(s)

🕵️ 2 new failures recognized by patterns

The following CI failures do not appear to be due to upstream breakages:

See GitHub Actions build linux-bionic-py3.8-gcc9-coverage / test (default, 2, 2, linux.2xlarge) (1/2)

Step: "Store PyTorch Test Reports" (full log | diagnosis details | 🔁 rerun)

2021-08-10T20:42:46.5530625Z test_add_done_ca...arg() takes 0 positional arguments but 1 was given
2021-08-10T20:42:46.5489438Z   /opt/conda/lib/python3.8/site-packages/torch/testing/_internal/common_utils.py(331): run_tests
2021-08-10T20:42:46.5490003Z   test_futures.py(329): <module>
2021-08-10T20:42:46.5490653Z   /opt/conda/lib/python3.8/site-packages/coverage/execfile.py(247): run
2021-08-10T20:42:46.5491418Z   /opt/conda/lib/python3.8/site-packages/coverage/cmdline.py(746): do_run
2021-08-10T20:42:46.5492190Z   /opt/conda/lib/python3.8/site-packages/coverage/cmdline.py(588): command_line
2021-08-10T20:42:46.5492963Z   /opt/conda/lib/python3.8/site-packages/coverage/cmdline.py(871): main
2021-08-10T20:42:46.5493474Z   /opt/conda/bin/coverage(8): <module>
2021-08-10T20:42:46.5493771Z 
2021-08-10T20:42:46.5494088Z ok (0.002s)
2021-08-10T20:42:46.5519694Z   test_add_done_callback_maintains_callback_order (__main__.TestFuture) ... ok (0.004s)
2021-08-10T20:42:46.5530625Z   test_add_done_callback_no_arg_error_is_ignored (__main__.TestFuture) ... [E pybind_utils.h:201] Got the following error when running the callback: TypeError: no_arg() takes 0 positional arguments but 1 was given
2021-08-10T20:42:46.5531649Z ok (0.001s)
2021-08-10T20:42:46.5554320Z   test_add_done_callback_simple (__main__.TestFuture) ... ok (0.002s)
2021-08-10T20:42:46.5628692Z   test_chained_then (__main__.TestFuture) ... ok (0.007s)
2021-08-10T20:42:46.6662897Z   test_collect_all (__main__.TestFuture) ... ok (0.103s)
2021-08-10T20:42:46.6677352Z   test_done (__main__.TestFuture) ... ok (0.002s)
2021-08-10T20:42:46.6703384Z   test_done_exception (__main__.TestFuture) ... ok (0.002s)
2021-08-10T20:42:46.6739528Z   test_interleaving_then_and_add_done_callback_maintains_callback_order (__main__.TestFuture) ... ok (0.003s)
2021-08-10T20:42:46.6760106Z   test_interleaving_then_and_add_done_callback_propagates_error (__main__.TestFuture) ... [E pybind_utils.h:201] Got the following error when running the callback: ValueError: Expected error
2021-08-10T20:42:46.6760828Z 
2021-08-10T20:42:46.6761120Z At:

See GitHub Actions build linux-bionic-py3.8-gcc9-coverage / test (default, 1, 2, linux.2xlarge) (2/2)

Step: "Store PyTorch Test Reports" (full log | diagnosis details | 🔁 rerun)

2021-08-10T20:28:44.8939229Z test_remote_mess...yUniqueId(created_on=0, local_id=0) to be created.
2021-08-10T20:28:18.5374853Z frame #14: c10::ThreadPool::main_loop(unsigned long) + 0x3bc (0x7f740a3705dc in /opt/conda/lib/python3.8/site-packages/torch/lib/libc10.so)
2021-08-10T20:28:18.5376767Z frame #15: <unknown function> + 0x7993a (0x7f740a37093a in /opt/conda/lib/python3.8/site-packages/torch/lib/libc10.so)
2021-08-10T20:28:18.5378159Z frame #16: <unknown function> + 0xc9039 (0x7f740a24b039 in /opt/conda/lib/libstdc++.so.6)
2021-08-10T20:28:18.5379669Z frame #17: <unknown function> + 0x76db (0x7f742dd6a6db in /lib/x86_64-linux-gnu/libpthread.so.0)
2021-08-10T20:28:18.5381080Z frame #18: clone + 0x3f (0x7f742da9371f in /lib/x86_64-linux-gnu/libc.so.6)
2021-08-10T20:28:18.5381690Z 
2021-08-10T20:28:19.0052956Z ok (3.826s)
2021-08-10T20:28:26.8400162Z   test_remote_message_dropped_pickle (__main__.FaultyFaultyAgentRpcTestWithSpawn) ... ok (7.835s)
2021-08-10T20:28:34.6741965Z   test_remote_message_dropped_pickle_to_self (__main__.FaultyFaultyAgentRpcTestWithSpawn) ... ok (7.834s)
2021-08-10T20:28:41.5057272Z   test_remote_message_script_delay_timeout (__main__.FaultyFaultyAgentRpcTestWithSpawn) ... ok (6.831s)
2021-08-10T20:28:44.8939229Z   test_remote_message_script_delay_timeout_to_self (__main__.FaultyFaultyAgentRpcTestWithSpawn) ... [E request_callback_no_python.cpp:559] Received error while processing request type 260: falseINTERNAL ASSERT FAILED at "/var/lib/jenkins/workspace/torch/csrc/distributed/rpc/rref_context.cpp":385, please report a bug to PyTorch. Expected OwnerRRef with id GloballyUniqueId(created_on=0, local_id=0) to be created.
2021-08-10T20:28:44.8944056Z Exception raised from getOwnerRRef at /var/lib/jenkins/workspace/torch/csrc/distributed/rpc/rref_context.cpp:385 (most recent call first):
2021-08-10T20:28:44.8948113Z frame #0: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) + 0x59 (0x7f7802d80ee9 in /opt/conda/lib/python3.8/site-packages/torch/lib/libc10.so)
2021-08-10T20:28:44.8952170Z frame #1: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) + 0xa3 (0x7f7802d37db4 in /opt/conda/lib/python3.8/site-packages/torch/lib/libc10.so)
2021-08-10T20:28:44.8956662Z frame #2: c10::detail::torchInternalAssertFail(char const*, char const*, unsigned int, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) + 0x61 (0x7f7802d7e2d1 in /opt/conda/lib/python3.8/site-packages/torch/lib/libc10.so)
2021-08-10T20:28:44.8960893Z frame #3: torch::distributed::rpc::RRefContext::getOwnerRRef(torch::distributed::rpc::GloballyUniqueId const&, bool) + 0x628 (0x7f780c300d48 in /opt/conda/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so)
2021-08-10T20:28:44.8966488Z frame #4: torch::distributed::rpc::RequestCallbackNoPython::assignOwnerRRef(torch::distributed::rpc::GloballyUniqueId const&, torch::distributed::rpc::GloballyUniqueId const&, c10::intrusive_ptr<c10::ivalue::Future, c10::detail::intrusive_target_default_null_type<c10::ivalue::Future> >) const + 0x8c (0x7f780c2e8b8c in /opt/conda/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so)
2021-08-10T20:28:44.8972896Z frame #5: torch::distributed::rpc::RequestCallbackImpl::processScriptRemoteCall(torch::distributed::rpc::RpcCommandBase&, std::vector<c10::Stream, std::allocator<c10::Stream> >) const + 0x265 (0x7f781cb46355 in /opt/conda/lib/python3.8/site-packages/torch/lib/libtorch_python.so)
2021-08-10T20:28:44.8978211Z frame #6: torch::distributed::rpc::RequestCallbackNoPython::processRpc(torch::distributed::rpc::RpcCommandBase&, torch::distributed::rpc::MessageType const&, std::vector<c10::Stream, std::allocator<c10::Stream> >) const + 0x178 (0x7f780c2ef558 in /opt/conda/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so)
2021-08-10T20:28:44.8983362Z frame #7: torch::distributed::rpc::RequestCallbackImpl::processRpcWithErrors(torch::distributed::rpc::RpcCommandBase&, torch::distributed::rpc::MessageType const&, std::vector<c10::Stream, std::allocator<c10::Stream> >) const + 0x60 (0x7f781cb44700 in /opt/conda/lib/python3.8/site-packages/torch/lib/libtorch_python.so)
2021-08-10T20:28:44.8987252Z frame #8: <unknown function> + 0x92e3680 (0x7f780c2e4680 in /opt/conda/lib/python3.8/site-packages/torch/lib/libtorch_cpu.so)

ci.pytorch.org: 1 failed


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.

Click here to manually regenerate this comment.

@kshitij12345
Copy link
Collaborator Author

ASAN Failure Debug Mode

/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple:133:17: runtime error: load of value 190, which is not a valid value for type 'bool'
    #0 0x7f49d48d4e6d in std::_Head_base<0ul, bool, false>::_Head_base<bool&>(bool&) /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple:133:17
    #1 0x7f49de6f0ded in std::_Tuple_impl<0ul, bool>::_Tuple_impl<bool&>(bool&) /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple:349:4
    #2 0x7f49de6f0d0d in std::tuple<bool>::tuple<bool&, true>(bool&) /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple:627:11
    #3 0x7f49de6f0c2a in std::tuple<std::__decay_and_strip<bool&>::__type> std::make_tuple<bool&>(bool&) /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/tuple:1474:14
    #4 0x7f49ee36e65b in function_traits<at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(bool)>::ArgsTuple at::native::(anonymous namespace)::dereference_impl<function_traits<at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(bool)>, 0ul>(char* restrict*, long const*, long, std::integer_sequence<unsigned long, 0ul>) /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/native/cpu/Loops.h:50:10
    #5 0x7f49ee36e233 in function_traits<at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(bool)>::ArgsTuple at::native::(anonymous namespace)::dereference<function_traits<at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(bool)> >(char* restrict*, long const*, long) /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/native/cpu/Loops.h:59:10
    #6 0x7f49ee36dfca in void at::native::(anonymous namespace)::execute_op<at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(bool), (void*)0>(char* restrict*, long const*, long, long, at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(bool)&&) /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/native/cpu/Loops.h:92:59
    #7 0x7f49ee36c916 in void at::native::(anonymous namespace)::basic_loop<at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(bool)>(char* restrict*, long const*, long, long, at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(bool)&&) /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/native/cpu/Loops.h:127:3
    #8 0x7f49ee36baf2 in void at::native::(anonymous namespace)::vectorized_loop<at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(bool), at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(at::vec::(anonymous namespace)::Vectorized<bool>)>(char**, long, long, at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(bool)&&, at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(at::vec::(anonymous namespace)::Vectorized<bool>)&&) /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/native/cpu/Loops.h:226:5
    #9 0x7f49ee36a60a in void at::native::(anonymous namespace)::cpu_kernel_vec<true, at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(bool), at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(at::vec::(anonymous namespace)::Vectorized<bool>)>(at::TensorIteratorBase&, at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(bool)&&, at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(at::vec::(anonymous namespace)::Vectorized<bool>)&&, long)::'lambda'(char**, long const*, long)::operator()(char**, long const*, long) const /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/native/cpu/Loops.h:302:7
    #10 0x7f49ee36a046 in auto at::TensorIteratorBase::loop_2d_from_1d<void at::native::(anonymous namespace)::cpu_kernel_vec<true, at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(bool), at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(at::vec::(anonymous namespace)::Vectorized<bool>)>(at::TensorIteratorBase&, at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(bool)&&, at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(at::vec::(anonymous namespace)::Vectorized<bool>)&&, long)::'lambda'(char**, long const*, long)>(void at::native::(anonymous namespace)::cpu_kernel_vec<true, at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(bool), at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(at::vec::(anonymous namespace)::Vectorized<bool>)>(at::TensorIteratorBase&, at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(bool)&&, at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(at::vec::(anonymous namespace)::Vectorized<bool>)&&, long)::'lambda'(char**, long const*, long) const&)::'lambda'(char**, long const*, long, long)::operator()(char**, long const*, long, long) const /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/TensorIterator.h:255:9
    #11 0x7f49ee36978d in void c10::function_ref<void (char**, long const*, long, long)>::callback_fn<auto at::TensorIteratorBase::loop_2d_from_1d<void at::native::(anonymous namespace)::cpu_kernel_vec<true, at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(bool), at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(at::vec::(anonymous namespace)::Vectorized<bool>)>(at::TensorIteratorBase&, at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(bool)&&, at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(at::vec::(anonymous namespace)::Vectorized<bool>)&&, long)::'lambda'(char**, long const*, long)>(void at::native::(anonymous namespace)::cpu_kernel_vec<true, at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(bool), at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(at::vec::(anonymous namespace)::Vectorized<bool>)>(at::TensorIteratorBase&, at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(bool)&&, at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(at::vec::(anonymous namespace)::Vectorized<bool>)&&, long)::'lambda'(char**, long const*, long) const&)::'lambda'(char**, long const*, long, long)>(long, char**, long const*, long, long) /home/kshiteej/Pytorch/pytorch_opinfo/c10/util/FunctionRef.h:43:12
    #12 0x7f49d3d3e1c5 in c10::function_ref<void (char**, long const*, long, long)>::operator()(char**, long const*, long, long) const /home/kshiteej/Pytorch/pytorch_opinfo/c10/util/FunctionRef.h:64:12
    #13 0x7f49d3d2ad48 in at::internal::serial_for_each(c10::ArrayRef<long>, c10::ArrayRef<long>, char**, unsigned long, c10::function_ref<void (char**, long const*, long, long)>, at::Range) /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/TensorIteratorInternal.h:57:7
    #14 0x7f49d3cfb05f in at::TensorIteratorBase::serial_for_each(c10::function_ref<void (char**, long const*, long, long)>, at::Range) const /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/TensorIterator.cpp:695:3
    #15 0x7f49d3cfa1d7 in at::TensorIteratorBase::for_each(c10::function_ref<void (char**, long const*, long, long)>, long) /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/TensorIterator.cpp:667:12
    #16 0x7f49ee36867f in void at::TensorIteratorBase::for_each<void at::native::(anonymous namespace)::cpu_kernel_vec<true, at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(bool), at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(at::vec::(anonymous namespace)::Vectorized<bool>)>(at::TensorIteratorBase&, at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(bool)&&, at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(at::vec::(anonymous namespace)::Vectorized<bool>)&&, long)::'lambda'(char**, long const*, long), 0>(void at::native::(anonymous namespace)::cpu_kernel_vec<true, at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(bool), at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(at::vec::(anonymous namespace)::Vectorized<bool>)>(at::TensorIteratorBase&, at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(bool)&&, at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(at::vec::(anonymous namespace)::Vectorized<bool>)&&, long)::'lambda'(char**, long const*, long), long) /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/TensorIterator.h:266:5
    #17 0x7f49ee367ffd in void at::native::(anonymous namespace)::cpu_kernel_vec<true, at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(bool), at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(at::vec::(anonymous namespace)::Vectorized<bool>)>(at::TensorIteratorBase&, at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(bool)&&, at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const::'lambda'(at::vec::(anonymous namespace)::Vectorized<bool>)&&, long) /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/native/cpu/Loops.h:300:8
    #18 0x7f49ee32c714 in at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const::'lambda14'()::operator()() const /home/kshiteej/Pytorch/pytorch_opinfo/build/aten/src/ATen/native/cpu/CopyKernel.cpp.AVX2.cpp:57:9
    #19 0x7f49ee2e2f06 in at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool)::$_2::operator()() const /home/kshiteej/Pytorch/pytorch_opinfo/build/aten/src/ATen/native/cpu/CopyKernel.cpp.AVX2.cpp:57:9
    #20 0x7f49ee2debbd in at::native::(anonymous namespace)::copy_kernel(at::TensorIterator&, bool) /home/kshiteej/Pytorch/pytorch_opinfo/build/aten/src/ATen/native/cpu/CopyKernel.cpp.AVX2.cpp:57:9
    #21 0x7f49d4b4b90f in void at::native::DispatchStub<void (*)(at::TensorIterator&, bool), at::native::copy_stub>::operator()<at::TensorIterator&, bool&>(c10::DeviceType, at::TensorIterator&, bool&) /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/native/DispatchStub.h:146:12
    #22 0x7f49d4b22473 in at::native::copy_impl(at::Tensor&, at::Tensor const&, bool) /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/native/Copy.cpp:242:3
    #23 0x7f49d4b1dbb1 in at::native::copy_(at::Tensor&, at::Tensor const&, bool) /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/native/Copy.cpp:250:5
    #24 0x7f49db462283 in at::(anonymous namespace)::(anonymous namespace)::wrapper__copy_(at::Tensor&, at::Tensor const&, bool) /home/kshiteej/Pytorch/pytorch_opinfo/build/aten/src/ATen/RegisterCompositeExplicitAutograd.cpp:1614:10
    #25 0x7f49db613b49 in c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor& (at::Tensor&, at::Tensor const&, bool), &(at::(anonymous namespace)::(anonymous namespace)::wrapper__copy_(at::Tensor&, at::Tensor const&, bool))>, at::Tensor&, c10::guts::typelist::typelist<at::Tensor&, at::Tensor const&, bool> >::operator()(at::Tensor&, at::Tensor const&, bool) /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/core/boxing/impl/WrapFunctionIntoFunctor.h:13:16
    #26 0x7f49db613b49 in c10::impl::wrap_kernel_functor_unboxed_<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor& (at::Tensor&, at::Tensor const&, bool), &(at::(anonymous namespace)::(anonymous namespace)::wrapper__copy_(at::Tensor&, at::Tensor const&, bool))>, at::Tensor&, c10::guts::typelist::typelist<at::Tensor&, at::Tensor const&, bool> >, at::Tensor& (at::Tensor&, at::Tensor const&, bool)>::call(c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool) /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:423
    #27 0x7f49d8d41120 in at::Tensor& c10::callUnboxedKernelFunction<at::Tensor&, at::Tensor&, at::Tensor const&, bool>(void*, c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool&&) /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/core/boxing/KernelFunction_impl.h:57:12
    #28 0x7f49d8d42aab in at::Tensor& c10::KernelFunction::call<at::Tensor&, at::Tensor&, at::Tensor const&, bool>(c10::OperatorHandle const&, c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool) const /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/core/boxing/KernelFunction_impl.h:67:16
    #29 0x7f49d8d42aab in at::Tensor& c10::Dispatcher::redispatch<at::Tensor&, at::Tensor&, at::Tensor const&, bool>(c10::TypedOperatorHandle<at::Tensor& (at::Tensor&, at::Tensor const&, bool)> const&, c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool) const /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/core/dispatch/Dispatcher.h:536
    #30 0x7f49d6f8b550 in c10::TypedOperatorHandle<at::Tensor& (at::Tensor&, at::Tensor const&, bool)>::redispatch(c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool) const /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/core/dispatch/Dispatcher.h:398:41
    #31 0x7f49d6f8b550 in at::_ops::copy_::redispatch(c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool) /home/kshiteej/Pytorch/pytorch_opinfo/build/aten/src/ATen/Operators.cpp:5249
    #32 0x7f49e9b61a95 in at::redispatch::copy_(c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool) /home/kshiteej/Pytorch/pytorch_opinfo/build/aten/src/ATen/RedispatchFunctions.h:1714:16
    #33 0x7f49e9b43bb4 in torch::ADInplaceOrView::copy_(c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool) /home/kshiteej/Pytorch/pytorch_opinfo/torch/csrc/autograd/VariableTypeManual.cpp:269:7
    #34 0x7f49e9b6cef8 in c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor& (c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool), &(torch::ADInplaceOrView::copy_(c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool))>, at::Tensor&, c10::guts::typelist::typelist<c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool> >::operator()(c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool) /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/core/boxing/impl/WrapFunctionIntoFunctor.h:13:16
    #35 0x7f49e9b6cef8 in c10::impl::wrap_kernel_functor_unboxed_<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor& (c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool), &(torch::ADInplaceOrView::copy_(c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool))>, at::Tensor&, c10::guts::typelist::typelist<c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool> >, at::Tensor& (c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool)>::call(c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool) /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:440
    #36 0x7f49d8d41120 in at::Tensor& c10::callUnboxedKernelFunction<at::Tensor&, at::Tensor&, at::Tensor const&, bool>(void*, c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool&&) /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/core/boxing/KernelFunction_impl.h:57:12
    #37 0x7f49d8d42aab in at::Tensor& c10::KernelFunction::call<at::Tensor&, at::Tensor&, at::Tensor const&, bool>(c10::OperatorHandle const&, c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool) const /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/core/boxing/KernelFunction_impl.h:67:16
    #38 0x7f49d8d42aab in at::Tensor& c10::Dispatcher::redispatch<at::Tensor&, at::Tensor&, at::Tensor const&, bool>(c10::TypedOperatorHandle<at::Tensor& (at::Tensor&, at::Tensor const&, bool)> const&, c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool) const /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/core/dispatch/Dispatcher.h:536
    #39 0x7f49d6f8b550 in c10::TypedOperatorHandle<at::Tensor& (at::Tensor&, at::Tensor const&, bool)>::redispatch(c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool) const /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/core/dispatch/Dispatcher.h:398:41
    #40 0x7f49d6f8b550 in at::_ops::copy_::redispatch(c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool) /home/kshiteej/Pytorch/pytorch_opinfo/build/aten/src/ATen/Operators.cpp:5249
    #41 0x7f49e9b61a95 in at::redispatch::copy_(c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool) /home/kshiteej/Pytorch/pytorch_opinfo/build/aten/src/ATen/RedispatchFunctions.h:1714:16
    #42 0x7f49e9b56ed5 in torch::autograd::VariableType::(anonymous namespace)::copy_(c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool) /home/kshiteej/Pytorch/pytorch_opinfo/torch/csrc/autograd/VariableTypeManual.cpp:129:5
    #43 0x7f49e9b59438 in c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor& (c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool), &(torch::autograd::VariableType::(anonymous namespace)::copy_(c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool))>, at::Tensor&, c10::guts::typelist::typelist<c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool> >::operator()(c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool) /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/core/boxing/impl/WrapFunctionIntoFunctor.h:13:16
    #44 0x7f49e9b59438 in c10::impl::wrap_kernel_functor_unboxed_<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor& (c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool), &(torch::autograd::VariableType::(anonymous namespace)::copy_(c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool))>, at::Tensor&, c10::guts::typelist::typelist<c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool> >, at::Tensor& (c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool)>::call(c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool) /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:440
    #45 0x7f49d8d41120 in at::Tensor& c10::callUnboxedKernelFunction<at::Tensor&, at::Tensor&, at::Tensor const&, bool>(void*, c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool&&) /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/core/boxing/KernelFunction_impl.h:57:12
    #46 0x7f49d6f8a47e in at::Tensor& c10::KernelFunction::call<at::Tensor&, at::Tensor&, at::Tensor const&, bool>(c10::OperatorHandle const&, c10::DispatchKeySet, at::Tensor&, at::Tensor const&, bool) const /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/core/boxing/KernelFunction_impl.h:67:16
    #47 0x7f49d6f8a47e in at::Tensor& c10::Dispatcher::call<at::Tensor&, at::Tensor&, at::Tensor const&, bool>(c10::TypedOperatorHandle<at::Tensor& (at::Tensor&, at::Tensor const&, bool)> const&, at::Tensor&, at::Tensor const&, bool) const /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/core/dispatch/Dispatcher.h:527
    #48 0x7f49d6f8a47e in c10::TypedOperatorHandle<at::Tensor& (at::Tensor&, at::Tensor const&, bool)>::call(at::Tensor&, at::Tensor const&, bool) const /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/core/dispatch/Dispatcher.h:393
    #49 0x7f49d6f8a47e in at::_ops::copy_::call(at::Tensor&, at::Tensor const&, bool) /home/kshiteej/Pytorch/pytorch_opinfo/build/aten/src/ATen/Operators.cpp:5241
    #50 0x7f4a2fa20764 in at::Tensor::copy_(at::Tensor const&, bool) const /home/kshiteej/Pytorch/pytorch_opinfo/build/aten/src/ATen/core/TensorBody.h:2374:12
    #51 0x7f4a316a109d in at::indexing::copy_to(at::Tensor const&, at::Tensor const&) /home/kshiteej/Pytorch/pytorch_opinfo/aten/src/ATen/TensorIndexing.h:353:9
    #52 0x7f4a3169b5f3 in torch::autograd::THPVariable_setitem(_object*, _object*, _object*) /home/kshiteej/Pytorch/pytorch_opinfo/torch/csrc/autograd/python_variable_indexing.cpp:431:5
    #53 0x5591bc082f32 in _PyEval_EvalFrameDefault /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:1576
    #54 0x5591bbff7e93 in PyEval_EvalFrameEx /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:547:12
    #55 0x5591bbff7e93 in function_code_fastcall /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:283:14
    #56 0x5591bbff7e93 in _PyFunction_FastCallKeywords /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:408
    #57 0x5591bc05b9c7 in call_function /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:4616
    #58 0x5591bc0824ab in _PyEval_EvalFrameDefault /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3124
    #59 0x5591bbfc9af1 in PyEval_EvalFrameEx /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:547:12
    #60 0x5591bbfc9af1 in _PyEval_EvalCodeWithName /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3930:14
    #61 0x5591bbfcb06c in _PyFunction_FastCallDict /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:376:14
    #62 0x5591bc083aa6 in do_call_core /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:4645
    #63 0x5591bc083aa6 in _PyEval_EvalFrameDefault /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3191
    #64 0x5591bbfc9af1 in PyEval_EvalFrameEx /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:547:12
    #65 0x5591bbfc9af1 in _PyEval_EvalCodeWithName /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3930:14
    #66 0x5591bbfcb06c in _PyFunction_FastCallDict /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:376:14
    #67 0x5591bbfe9c4d in _PyObject_Call_Prepend /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:906:14
    #68 0x5591bc0c9e98 in slot_tp_call /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/typeobject.c:6402
    #69 0x5591bbfcd08b in PyObject_Call /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:245:19
    #70 0x5591bc083aa6 in do_call_core /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:4645
    #71 0x5591bc083aa6 in _PyEval_EvalFrameDefault /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3191
    #72 0x5591bbfc9af1 in PyEval_EvalFrameEx /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:547:12
    #73 0x5591bbfc9af1 in _PyEval_EvalCodeWithName /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3930:14
    #74 0x5591bbfcb3a7 in _PyFunction_FastCallDict /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:376:14
    #75 0x5591bc083aa6 in do_call_core /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:4645
    #76 0x5591bc083aa6 in _PyEval_EvalFrameDefault /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3191
    #77 0x5591bbfc9af1 in PyEval_EvalFrameEx /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:547:12
    #78 0x5591bbfc9af1 in _PyEval_EvalCodeWithName /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3930:14
    #79 0x5591bbfcb3a7 in _PyFunction_FastCallDict /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:376:14
    #80 0x5591bc083aa6 in do_call_core /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:4645
    #81 0x5591bc083aa6 in _PyEval_EvalFrameDefault /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3191
    #82 0x5591bbfc9af1 in PyEval_EvalFrameEx /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:547:12
    #83 0x5591bbfc9af1 in _PyEval_EvalCodeWithName /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3930:14
    #84 0x5591bbfcb3a7 in _PyFunction_FastCallDict /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:376:14
    #85 0x5591bc083aa6 in do_call_core /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:4645
    #86 0x5591bc083aa6 in _PyEval_EvalFrameDefault /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3191
    #87 0x5591bbfc9af1 in PyEval_EvalFrameEx /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:547:12
    #88 0x5591bbfc9af1 in _PyEval_EvalCodeWithName /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3930:14
    #89 0x5591bbfcb3a7 in _PyFunction_FastCallDict /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:376:14
    #90 0x5591bc083aa6 in do_call_core /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:4645
    #91 0x5591bc083aa6 in _PyEval_EvalFrameDefault /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3191
    #92 0x5591bbfc9af1 in PyEval_EvalFrameEx /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:547:12
    #93 0x5591bbfc9af1 in _PyEval_EvalCodeWithName /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3930:14
    #94 0x5591bbff802f in _PyFunction_FastCallKeywords /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:433
    #95 0x5591bc05b9c7 in call_function /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:4616
    #96 0x5591bc0824ab in _PyEval_EvalFrameDefault /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3124
    #97 0x5591bbfc9af1 in PyEval_EvalFrameEx /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:547:12
    #98 0x5591bbfc9af1 in _PyEval_EvalCodeWithName /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3930:14
    #99 0x5591bbff802f in _PyFunction_FastCallKeywords /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:433
    #100 0x5591bc05b9c7 in call_function /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:4616
    #101 0x5591bc0831d8 in _PyEval_EvalFrameDefault /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3139
    #102 0x5591bbfc9af1 in PyEval_EvalFrameEx /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:547:12
    #103 0x5591bbfc9af1 in _PyEval_EvalCodeWithName /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3930:14
    #104 0x5591bbff802f in _PyFunction_FastCallKeywords /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:433
    #105 0x5591bc05b9c7 in call_function /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:4616
    #106 0x5591bc0831d8 in _PyEval_EvalFrameDefault /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3139
    #107 0x5591bbfc9af1 in PyEval_EvalFrameEx /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:547:12
    #108 0x5591bbfc9af1 in _PyEval_EvalCodeWithName /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3930:14
    #109 0x5591bbfcb06c in _PyFunction_FastCallDict /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:376:14
    #110 0x5591bc030f92 in _PyObject_FastCallDict /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:98:16
    #111 0x5591bc030f92 in _PyObject_Call_Prepend /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:906:14
    #112 0x5591bc030f92 in method_call /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/classobject.c:309
    #113 0x5591bbfcd08b in PyObject_Call /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:245:19
    #114 0x5591bc083aa6 in do_call_core /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:4645
    #115 0x5591bc083aa6 in _PyEval_EvalFrameDefault /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3191
    #116 0x5591bbfc9af1 in PyEval_EvalFrameEx /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:547:12
    #117 0x5591bbfc9af1 in _PyEval_EvalCodeWithName /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3930:14
    #118 0x5591bbfcb06c in _PyFunction_FastCallDict /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:376:14
    #119 0x5591bbfe9c4d in _PyObject_Call_Prepend /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:906:14
    #120 0x5591bc0c9e98 in slot_tp_call /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/typeobject.c:6402
    #121 0x5591bc05aa5a in _PyObject_FastCallKeywords /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:199
    #122 0x5591bc05bb58 in call_function /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:4619
    #123 0x5591bc0824ab in _PyEval_EvalFrameDefault /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3124
    #124 0x5591bbfc9af1 in PyEval_EvalFrameEx /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:547:12
    #125 0x5591bbfc9af1 in _PyEval_EvalCodeWithName /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3930:14
    #126 0x5591bbfcb06c in _PyFunction_FastCallDict /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:376:14
    #127 0x5591bc030f92 in _PyObject_FastCallDict /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:98:16
    #128 0x5591bc030f92 in _PyObject_Call_Prepend /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:906:14
    #129 0x5591bc030f92 in method_call /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/classobject.c:309
    #130 0x5591bbfcd08b in PyObject_Call /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:245:19
    #131 0x5591bc083aa6 in do_call_core /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:4645
    #132 0x5591bc083aa6 in _PyEval_EvalFrameDefault /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3191
    #133 0x5591bbfc9af1 in PyEval_EvalFrameEx /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:547:12
    #134 0x5591bbfc9af1 in _PyEval_EvalCodeWithName /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3930:14
    #135 0x5591bbfcb06c in _PyFunction_FastCallDict /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:376:14
    #136 0x5591bbfe9c4d in _PyObject_Call_Prepend /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:906:14
    #137 0x5591bc0c9e98 in slot_tp_call /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/typeobject.c:6402
    #138 0x5591bc05aa5a in _PyObject_FastCallKeywords /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:199
    #139 0x5591bc05bb58 in call_function /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:4619
    #140 0x5591bc0824ab in _PyEval_EvalFrameDefault /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3124
    #141 0x5591bbfc9af1 in PyEval_EvalFrameEx /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:547:12
    #142 0x5591bbfc9af1 in _PyEval_EvalCodeWithName /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3930:14
    #143 0x5591bbfcb06c in _PyFunction_FastCallDict /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:376:14
    #144 0x5591bc030f92 in _PyObject_FastCallDict /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:98:16
    #145 0x5591bc030f92 in _PyObject_Call_Prepend /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:906:14
    #146 0x5591bc030f92 in method_call /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/classobject.c:309
    #147 0x5591bbfcd08b in PyObject_Call /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:245:19
    #148 0x5591bc083aa6 in do_call_core /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:4645
    #149 0x5591bc083aa6 in _PyEval_EvalFrameDefault /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3191
    #150 0x5591bbfc9af1 in PyEval_EvalFrameEx /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:547:12
    #151 0x5591bbfc9af1 in _PyEval_EvalCodeWithName /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3930:14
    #152 0x5591bbfcb06c in _PyFunction_FastCallDict /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:376:14
    #153 0x5591bbfe9c4d in _PyObject_Call_Prepend /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:906:14
    #154 0x5591bc0c9e98 in slot_tp_call /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/typeobject.c:6402
    #155 0x5591bc05aa5a in _PyObject_FastCallKeywords /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:199
    #156 0x5591bc05bb58 in call_function /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:4619
    #157 0x5591bc0824ab in _PyEval_EvalFrameDefault /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3124
    #158 0x5591bbff7e93 in PyEval_EvalFrameEx /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:547:12
    #159 0x5591bbff7e93 in function_code_fastcall /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:283:14
    #160 0x5591bbff7e93 in _PyFunction_FastCallKeywords /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:408
    #161 0x5591bc05b9c7 in call_function /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:4616
    #162 0x5591bc082543 in _PyEval_EvalFrameDefault /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3110
    #163 0x5591bbff7e93 in PyEval_EvalFrameEx /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:547:12
    #164 0x5591bbff7e93 in function_code_fastcall /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:283:14
    #165 0x5591bbff7e93 in _PyFunction_FastCallKeywords /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:408
    #166 0x5591bc05b9c7 in call_function /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:4616
    #167 0x5591bc082543 in _PyEval_EvalFrameDefault /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3110
    #168 0x5591bbfc9af1 in PyEval_EvalFrameEx /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:547:12
    #169 0x5591bbfc9af1 in _PyEval_EvalCodeWithName /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3930:14
    #170 0x5591bbfcb3a7 in _PyFunction_FastCallDict /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:376:14
    #171 0x5591bc0328ab in _PyObject_FastCallDict /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:98:16
    #172 0x5591bc0328ab in _PyObject_Call_Prepend /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:906:14
    #173 0x5591bc0328ab in slot_tp_init /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/typeobject.c:6636
    #174 0x5591bc05a75b in type_call /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/typeobject.c:971:19
    #175 0x5591bc05a75b in _PyObject_FastCallKeywords /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:199
    #176 0x5591bc05bb58 in call_function /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:4619
    #177 0x5591bc0831d8 in _PyEval_EvalFrameDefault /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3139
    #178 0x5591bc0bf4d5 in PyEval_EvalFrameEx /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:547:12
    #179 0x5591bc0bf4d5 in function_code_fastcall /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Objects/call.c:283:14
    #180 0x5591bc05b9c7 in call_function /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:4616
    #181 0x5591bc0824ab in _PyEval_EvalFrameDefault /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3124
    #182 0x5591bbfc9af1 in PyEval_EvalFrameEx /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:547:12
    #183 0x5591bbfc9af1 in _PyEval_EvalCodeWithName /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3930:14
    #184 0x5591bbfcad08 in PyEval_EvalCodeEx /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:3959:12
    #185 0x5591bc0a58aa in PyEval_EvalCode /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/ceval.c:524:12
    #186 0x5591bc109f52 in run_mod /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/pythonrun.c:1035
    #187 0x5591bc113fd6 in PyRun_FileExFlags /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/pythonrun.c:988
    #188 0x5591bc1141ab in PyRun_SimpleFileExFlags /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Python/pythonrun.c:429
    #189 0x5591bc114708 in pymain_run_file /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Modules/main.c:456
    #190 0x5591bc114708 in pymain_run_filename /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Modules/main.c:1646
    #191 0x5591bc114708 in pymain_run_python /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Modules/main.c:2907
    #192 0x5591bc114708 in pymain_main /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Modules/main.c:3068
    #193 0x5591bc11485b in _Py_UnixMain /home/conda/feedstock_root/build_artifacts/python_1613748395163/work/Modules/main.c:3103
    #194 0x7f4a3e9600b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
    #195 0x5591bc091900 in _start (/home/kshiteej/miniconda3/bin/python3.7+0x1c5900)

@kshitij12345 kshitij12345 marked this pull request as ready for review August 6, 2021 14:59
@kshitij12345
Copy link
Collaborator Author

kshitij12345 commented Aug 6, 2021

CI Failures look unrelated. (will rebase post review)

@gchanan gchanan added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Aug 9, 2021
Comment on lines 2648 to 2650
# test_dtypes fails on ASAN with for the case below
# runtime error: load of value 190, which is not a valid value for type 'bool'
# Reference: https://github.com/pytorch/pytorch/pull/62814#issuecomment-894156562
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a bug in PyTorch?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so. Was planning to open an issue to investigate later. Thanks for reminding.

for pad_value in (1., 2.):
yield SampleInput(make_inp(shape), args=(pad, mode, pad_value))

samples = list(generator())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How many samples does this actually generate?

Copy link
Contributor

@zou3519 zou3519 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments and questions

Comment on lines 2665 to 2705
def generator():
if mode == 'constant':
# Default args
yield SampleInput(make_inp((1, 3, 3)), args=((2, 2),))

for shape, pad in chain(product(shapes, pads), negative_pad_case):
# Not all combinations of shapes and pads are valid
# Below are the checks to remove skip invalid combinations

# Function requires len(pad)/2 <= len(shape)
if not (len(pad) // 2 <= len(shape)):
continue

if mode in ['reflect', 'replicate', 'circular']:
input_dim = len(shape)
# Valid pad length for given input dim
if len(pad) == 2 and not (input_dim in (2, 3)):
continue
if len(pad) == 4 and not (input_dim in (3, 4)):
continue
if len(pad) == 6 and not (input_dim in (4, 5)):
continue

# Expected XD or YD (batch mode) tensor with possibly 0 batch size
# and other non-zero dimensions for input
if len(pad) == 2 and input_dim == 2 and shape[0] == 0:
continue
if len(pad) == 4 and input_dim == 3 and shape[0] == 0:
continue
if len(pad) == 6 and input_dim == 4 and shape[0] == 0:
continue

if mode == 'circular':
if not (len(pad) == 2 * (input_dim - 2)):
continue

if mode in ['reflect', 'replicate', 'circular']:
yield SampleInput(make_inp(shape), args=(pad, mode))
else:
for pad_value in (1., 2.):
yield SampleInput(make_inp(shape), args=(pad, mode, pad_value))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way this is set up makes it difficult to reason about exactly what the samples look like and how many there are. If there aren't too many samples, would it be better to just list them all? E.g. have a table of (shape, pad):

cases = [
    ((1, 3), (1, 2)),  # (shape, pad)
    ...
]

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. It is hard to reason about. Will break it as cases. Thanks!

Below are the samples generated (will turn them to cases)

constant

torch.Size([1, 3, 3]) ((2, 2),)
torch.Size([1, 3]) ((1, 2), 'constant', 1.0)
torch.Size([1, 3]) ((1, 2), 'constant', 2.0)
torch.Size([1, 3]) ((0, 1), 'constant', 1.0)
torch.Size([1, 3]) ((0, 1), 'constant', 2.0)
torch.Size([1, 3]) ((0, 2, 0, 1), 'constant', 1.0)
torch.Size([1, 3]) ((0, 2, 0, 1), 'constant', 2.0)
torch.Size([0, 3, 3]) ((1, 2), 'constant', 1.0)
torch.Size([0, 3, 3]) ((1, 2), 'constant', 2.0)
torch.Size([0, 3, 3]) ((0, 1), 'constant', 1.0)
torch.Size([0, 3, 3]) ((0, 1), 'constant', 2.0)
torch.Size([0, 3, 3]) ((0, 2, 0, 1), 'constant', 1.0)
torch.Size([0, 3, 3]) ((0, 2, 0, 1), 'constant', 2.0)
torch.Size([0, 3, 3]) ((1, 1, 1, 1, 1, 1), 'constant', 1.0)
torch.Size([0, 3, 3]) ((1, 1, 1, 1, 1, 1), 'constant', 2.0)
torch.Size([1, 3, 3]) ((1, 2), 'constant', 1.0)
torch.Size([1, 3, 3]) ((1, 2), 'constant', 2.0)
torch.Size([1, 3, 3]) ((0, 1), 'constant', 1.0)
torch.Size([1, 3, 3]) ((0, 1), 'constant', 2.0)
torch.Size([1, 3, 3]) ((0, 2, 0, 1), 'constant', 1.0)
torch.Size([1, 3, 3]) ((0, 2, 0, 1), 'constant', 2.0)
torch.Size([1, 3, 3]) ((1, 1, 1, 1, 1, 1), 'constant', 1.0)
torch.Size([1, 3, 3]) ((1, 1, 1, 1, 1, 1), 'constant', 2.0)
torch.Size([0, 3, 3, 3]) ((1, 2), 'constant', 1.0)
torch.Size([0, 3, 3, 3]) ((1, 2), 'constant', 2.0)
torch.Size([0, 3, 3, 3]) ((0, 1), 'constant', 1.0)
torch.Size([0, 3, 3, 3]) ((0, 1), 'constant', 2.0)
torch.Size([0, 3, 3, 3]) ((0, 2, 0, 1), 'constant', 1.0)
torch.Size([0, 3, 3, 3]) ((0, 2, 0, 1), 'constant', 2.0)
torch.Size([0, 3, 3, 3]) ((1, 1, 1, 1, 1, 1), 'constant', 1.0)
torch.Size([0, 3, 3, 3]) ((1, 1, 1, 1, 1, 1), 'constant', 2.0)
torch.Size([3, 3, 5, 5]) ((1, 2), 'constant', 1.0)
torch.Size([3, 3, 5, 5]) ((1, 2), 'constant', 2.0)
torch.Size([3, 3, 5, 5]) ((0, 1), 'constant', 1.0)
torch.Size([3, 3, 5, 5]) ((0, 1), 'constant', 2.0)
torch.Size([3, 3, 5, 5]) ((0, 2, 0, 1), 'constant', 1.0)
torch.Size([3, 3, 5, 5]) ((0, 2, 0, 1), 'constant', 2.0)
torch.Size([3, 3, 5, 5]) ((1, 1, 1, 1, 1, 1), 'constant', 1.0)
torch.Size([3, 3, 5, 5]) ((1, 1, 1, 1, 1, 1), 'constant', 2.0)
torch.Size([1, 3, 3, 3, 3]) ((1, 2), 'constant', 1.0)
torch.Size([1, 3, 3, 3, 3]) ((1, 2), 'constant', 2.0)
torch.Size([1, 3, 3, 3, 3]) ((0, 1), 'constant', 1.0)
torch.Size([1, 3, 3, 3, 3]) ((0, 1), 'constant', 2.0)
torch.Size([1, 3, 3, 3, 3]) ((0, 2, 0, 1), 'constant', 1.0)
torch.Size([1, 3, 3, 3, 3]) ((0, 2, 0, 1), 'constant', 2.0)
torch.Size([1, 3, 3, 3, 3]) ((1, 1, 1, 1, 1, 1), 'constant', 1.0)
torch.Size([1, 3, 3, 3, 3]) ((1, 1, 1, 1, 1, 1), 'constant', 2.0)
torch.Size([1, 3, 4, 4]) ((-1, 1, -2, 1), 'constant', 1.0)
torch.Size([1, 3, 4, 4]) ((-1, 1, -2, 1), 'constant', 2.0)

reflect

torch.Size([1, 3]) ((1, 2), 'reflect')
torch.Size([1, 3]) ((0, 1), 'reflect')
torch.Size([0, 3, 3]) ((1, 2), 'reflect')
torch.Size([0, 3, 3]) ((0, 1), 'reflect')
torch.Size([1, 3, 3]) ((1, 2), 'reflect')
torch.Size([1, 3, 3]) ((0, 1), 'reflect')
torch.Size([1, 3, 3]) ((0, 2, 0, 1), 'reflect')
torch.Size([0, 3, 3, 3]) ((0, 2, 0, 1), 'reflect')
torch.Size([3, 3, 5, 5]) ((0, 2, 0, 1), 'reflect')
torch.Size([3, 3, 5, 5]) ((1, 1, 1, 1, 1, 1), 'reflect')
torch.Size([1, 3, 3, 3, 3]) ((1, 1, 1, 1, 1, 1), 'reflect')
torch.Size([1, 3, 4, 4]) ((-1, 1, -2, 1), 'reflect')

replicate

torch.Size([1, 3]) ((1, 2), 'replicate')
torch.Size([1, 3]) ((0, 1), 'replicate')
torch.Size([0, 3, 3]) ((1, 2), 'replicate')
torch.Size([0, 3, 3]) ((0, 1), 'replicate')
torch.Size([1, 3, 3]) ((1, 2), 'replicate')
torch.Size([1, 3, 3]) ((0, 1), 'replicate')
torch.Size([1, 3, 3]) ((0, 2, 0, 1), 'replicate')
torch.Size([0, 3, 3, 3]) ((0, 2, 0, 1), 'replicate')
torch.Size([3, 3, 5, 5]) ((0, 2, 0, 1), 'replicate')
torch.Size([3, 3, 5, 5]) ((1, 1, 1, 1, 1, 1), 'replicate')
torch.Size([1, 3, 3, 3, 3]) ((1, 1, 1, 1, 1, 1), 'replicate')
torch.Size([1, 3, 4, 4]) ((-1, 1, -2, 1), 'replicate')

circular

torch.Size([0, 3, 3]) ((1, 2), 'circular')
torch.Size([0, 3, 3]) ((0, 1), 'circular')
torch.Size([1, 3, 3]) ((1, 2), 'circular')
torch.Size([1, 3, 3]) ((0, 1), 'circular')
torch.Size([0, 3, 3, 3]) ((0, 2, 0, 1), 'circular')
torch.Size([3, 3, 5, 5]) ((0, 2, 0, 1), 'circular')
torch.Size([1, 3, 3, 3, 3]) ((1, 1, 1, 1, 1, 1), 'circular')
torch.Size([1, 3, 4, 4]) ((-1, 1, -2, 1), 'circular')

circular bool

torch.Size([2, 3, 3]) ((1, 2), 'circular')
torch.Size([1, 3, 3]) ((1, 2), 'circular')

Comment on lines +2666 to +2668
if mode == 'constant':
# Default args
yield SampleInput(make_inp((1, 3, 3)), args=((2, 2),))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So for constant pad we only have a single test case? Maybe constant pad should be a separate sample_inputs_nn_pad_constant function

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually it's more than that.

Ref: #62814 (comment)

@kshitij12345
Copy link
Collaborator Author

@zou3519 have mostly addressed the review. This PR is ready for another round. Thanks!

Comment on lines +2692 to +2703
((1, 3), (1, 2)),
((1, 3), (0, 1)),
((0, 3, 3), (1, 2)),
((0, 3, 3), (0, 1)),
((1, 3, 3), (1, 2)),
((1, 3, 3), (0, 1)),
((1, 3, 3), (0, 2, 0, 1)),
((0, 3, 3, 3), (0, 2, 0, 1)),
((3, 3, 5, 5), (0, 2, 0, 1)),
((3, 3, 5, 5), (1, 1, 1, 1, 1, 1)),
((1, 3, 3, 3, 3), (1, 1, 1, 1, 1, 1)),
((1, 3, 4, 4), (-1, 1, -2, 1)),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need this many cases? For example, we probably only need a single case for batch-size 0 and we probably don't need so many cases to test that pad 0 works

((0, 3, 3, 3), (0, 2, 0, 1)),
((3, 3, 5, 5), (0, 2, 0, 1)),
((3, 3, 5, 5), (1, 1, 1, 1, 1, 1)),
((1, 3, 3, 3, 3), (1, 1, 1, 1, 1, 1)),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the docs on reflect padding are wrong...
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been fixed on master.
image

Comment on lines +2707 to +2730
((1, 3), (1, 2)),
((1, 3), (0, 1)),
((1, 3), (0, 2, 0, 1)),
((0, 3, 3), (1, 2)),
((0, 3, 3), (0, 1)),
((0, 3, 3), (0, 2, 0, 1)),
((0, 3, 3), (1, 1, 1, 1, 1, 1)),
((1, 3, 3), (1, 2)),
((1, 3, 3), (0, 1)),
((1, 3, 3), (0, 2, 0, 1)),
((1, 3, 3), (1, 1, 1, 1, 1, 1)),
((0, 3, 3, 3), (1, 2)),
((0, 3, 3, 3), (0, 1)),
((0, 3, 3, 3), (0, 2, 0, 1)),
((0, 3, 3, 3), (1, 1, 1, 1, 1, 1)),
((3, 3, 5, 5), (1, 2)),
((3, 3, 5, 5), (0, 1)),
((3, 3, 5, 5), (0, 2, 0, 1)),
((3, 3, 5, 5), (1, 1, 1, 1, 1, 1)),
((1, 3, 3, 3, 3), (1, 2)),
((1, 3, 3, 3, 3), (0, 1)),
((1, 3, 3, 3, 3), (0, 2, 0, 1)),
((1, 3, 3, 3, 3), (1, 1, 1, 1, 1, 1)),
((1, 3, 4, 4), (-1, 1, -2, 1)),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto here: do we need this many cases?

for shape, pad in cases:
yield SampleInput(make_inp(shape), args=(pad, mode))
else: # mode == 'constant'
for pad_value in (1., 2.):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be good to just put this value into the above shape dict and test 1 or 2 as the value for each case. Otherwise this means that we duplicate all of the above tests, and there are indeed a lot of tests.

Copy link
Contributor

@zou3519 zou3519 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm worried that we're testing too much here, but maybe the complexity of this operation requires that we test this much -- what do you think?

@kshitij12345
Copy link
Collaborator Author

Yeah. I agree it is a lot of test. But thought that this would be helpful as reflect, replicate, constant, circular all are different ops.
With reflect and replicate having different 1d, 2d, 3d implementation in ATen.

But if this feels like a lot of cases, I'll be happy to trim them.

@kshitij12345
Copy link
Collaborator Author

Gentle Ping :) @zou3519

@zou3519
Copy link
Contributor

zou3519 commented Aug 13, 2021

Let's keep them for now, we can always trim them down later.

Copy link
Contributor

@zou3519 zou3519 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@facebook-github-bot
Copy link
Contributor

@zou3519 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@zou3519 merged this pull request in 3ce67ef.

alanwaketan pushed a commit that referenced this pull request Aug 17, 2021
Summary:
Reference: pytorch/functorch#78

Pull Request resolved: #62814

Reviewed By: VitalyFedyunin

Differential Revision: D30307492

Pulled By: zou3519

fbshipit-source-id: 4f6062eb4a3c91ed1795df1f82846afa0abafcdc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed Merged open source triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants