PT2 compliant - fbgemm::jagged_dense_elementwise_add_jagged_output#2327
PT2 compliant - fbgemm::jagged_dense_elementwise_add_jagged_output#2327davidberard98 wants to merge 1 commit into
Conversation
✅ Deploy Preview for pytorch-fbgemm-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
This pull request was exported from Phabricator. Differential Revision: D53650907 |
…ytorch#2327) Summary: This op previously didn't have an autograd registration. a) We would see this warning: ``` /data/users/dberard/fbsource/buck-out/v2/gen/fbcode/6f27a84d3075b0d5/scripts/dberard/jplusd/__jagged_plus_dense__/jagged_plus_dense#link-tree/torch/autograd/graph.py:744: UserWarning: fbgemm::jagged_dense_elementwise_add_jagged_output: an autograd kernel was not registered to the Autograd key(s) but we are trying to backprop through it. This may lead to silently incorrect behavior. This behavior is deprecated and will be removed in a future version of PyTorch. If your operator is differentiable, please ensure you have registered an autograd kernel to the correct Autograd key (e.g. DispatchKey::Autograd, DispatchKey::CompositeImplicitAutograd). If your operator is not differentiable, or to squash this warning and use the previous behavior, please register torch::CppFunction::makeFallthrough() to DispatchKey::Autograd. (Triggered internally at fbcode/caffe2/torch/csrc/autograd/autograd_not_implemented_fallback.cpp:72.) ``` (b) Sometimes we would get aot_autograd partitioner issues because this op would not show up as an op returning a tensor Previous issue: a single implementation for both CPU and Autograd was registered, which would call DenseToJaggedOp::apply(); a separate CUDA implementation was registered which did not have a backward registration. Updated implementation: - added a CPU implementation which does `jagged + dense_to_jagged(dense, offsets)` - added an AutogradFunction implementation, which: in forward, redispatches to jagged_dense_elementwise_add_jagged_output; and in backward, redispatches to jagged_to_dense. Differential Revision: D53650907
5c48b7b to
cf5061e
Compare
|
This pull request was exported from Phabricator. Differential Revision: D53650907 |
…ytorch#2327) Summary: This op previously didn't have an autograd registration. a) We would see this warning: ``` /data/users/dberard/fbsource/buck-out/v2/gen/fbcode/6f27a84d3075b0d5/scripts/dberard/jplusd/__jagged_plus_dense__/jagged_plus_dense#link-tree/torch/autograd/graph.py:744: UserWarning: fbgemm::jagged_dense_elementwise_add_jagged_output: an autograd kernel was not registered to the Autograd key(s) but we are trying to backprop through it. This may lead to silently incorrect behavior. This behavior is deprecated and will be removed in a future version of PyTorch. If your operator is differentiable, please ensure you have registered an autograd kernel to the correct Autograd key (e.g. DispatchKey::Autograd, DispatchKey::CompositeImplicitAutograd). If your operator is not differentiable, or to squash this warning and use the previous behavior, please register torch::CppFunction::makeFallthrough() to DispatchKey::Autograd. (Triggered internally at fbcode/caffe2/torch/csrc/autograd/autograd_not_implemented_fallback.cpp:72.) ``` (b) Sometimes we would get aot_autograd partitioner issues because this op would not show up as an op returning a tensor Previous issue: a single implementation for both CPU and Autograd was registered, which would call DenseToJaggedOp::apply(); a separate CUDA implementation was registered which did not have a backward registration. Updated implementation: - added a CPU implementation which does `jagged + dense_to_jagged(dense, offsets)` - added an AutogradFunction implementation, which: in forward, redispatches to jagged_dense_elementwise_add_jagged_output; and in backward, redispatches to jagged_to_dense. Differential Revision: D53650907
cf5061e to
37200c8
Compare
|
This pull request was exported from Phabricator. Differential Revision: D53650907 |
…ytorch#2327) Summary: This op previously didn't have an autograd registration. a) We would see this warning: ``` /data/users/dberard/fbsource/buck-out/v2/gen/fbcode/6f27a84d3075b0d5/scripts/dberard/jplusd/__jagged_plus_dense__/jagged_plus_dense#link-tree/torch/autograd/graph.py:744: UserWarning: fbgemm::jagged_dense_elementwise_add_jagged_output: an autograd kernel was not registered to the Autograd key(s) but we are trying to backprop through it. This may lead to silently incorrect behavior. This behavior is deprecated and will be removed in a future version of PyTorch. If your operator is differentiable, please ensure you have registered an autograd kernel to the correct Autograd key (e.g. DispatchKey::Autograd, DispatchKey::CompositeImplicitAutograd). If your operator is not differentiable, or to squash this warning and use the previous behavior, please register torch::CppFunction::makeFallthrough() to DispatchKey::Autograd. (Triggered internally at fbcode/caffe2/torch/csrc/autograd/autograd_not_implemented_fallback.cpp:72.) ``` (b) Sometimes we would get aot_autograd partitioner issues because this op would not show up as an op returning a tensor Previous issue: a single implementation for both CPU and Autograd was registered, which would call DenseToJaggedOp::apply(); a separate CUDA implementation was registered which did not have a backward registration. Updated implementation: - added a CPU implementation which does `jagged + dense_to_jagged(dense, offsets)` - added an AutogradFunction implementation, which: in forward, redispatches to jagged_dense_elementwise_add_jagged_output; and in backward, redispatches to jagged_to_dense. Differential Revision: D53650907
37200c8 to
1396cb8
Compare
|
This pull request was exported from Phabricator. Differential Revision: D53650907 |
…ytorch#2327) Summary: This op previously didn't have an autograd registration. a) We would see this warning: ``` /data/users/dberard/fbsource/buck-out/v2/gen/fbcode/6f27a84d3075b0d5/scripts/dberard/jplusd/__jagged_plus_dense__/jagged_plus_dense#link-tree/torch/autograd/graph.py:744: UserWarning: fbgemm::jagged_dense_elementwise_add_jagged_output: an autograd kernel was not registered to the Autograd key(s) but we are trying to backprop through it. This may lead to silently incorrect behavior. This behavior is deprecated and will be removed in a future version of PyTorch. If your operator is differentiable, please ensure you have registered an autograd kernel to the correct Autograd key (e.g. DispatchKey::Autograd, DispatchKey::CompositeImplicitAutograd). If your operator is not differentiable, or to squash this warning and use the previous behavior, please register torch::CppFunction::makeFallthrough() to DispatchKey::Autograd. (Triggered internally at fbcode/caffe2/torch/csrc/autograd/autograd_not_implemented_fallback.cpp:72.) ``` (b) Sometimes we would get aot_autograd partitioner issues because this op would not show up as an op returning a tensor Previous issue: a single implementation for both CPU and Autograd was registered, which would call DenseToJaggedOp::apply(); a separate CUDA implementation was registered which did not have a backward registration. Updated implementation: - added a CPU implementation which does `jagged + dense_to_jagged(dense, offsets)` - added an AutogradFunction implementation, which: in forward, redispatches to jagged_dense_elementwise_add_jagged_output; and in backward, redispatches to jagged_to_dense. Differential Revision: D53650907
1396cb8 to
ac73a2a
Compare
|
This pull request was exported from Phabricator. Differential Revision: D53650907 |
|
@davidberard98 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
…ytorch#2327) Summary: This op previously didn't have an autograd registration. a) We would see this warning: ``` /data/users/dberard/fbsource/buck-out/v2/gen/fbcode/6f27a84d3075b0d5/scripts/dberard/jplusd/__jagged_plus_dense__/jagged_plus_dense#link-tree/torch/autograd/graph.py:744: UserWarning: fbgemm::jagged_dense_elementwise_add_jagged_output: an autograd kernel was not registered to the Autograd key(s) but we are trying to backprop through it. This may lead to silently incorrect behavior. This behavior is deprecated and will be removed in a future version of PyTorch. If your operator is differentiable, please ensure you have registered an autograd kernel to the correct Autograd key (e.g. DispatchKey::Autograd, DispatchKey::CompositeImplicitAutograd). If your operator is not differentiable, or to squash this warning and use the previous behavior, please register torch::CppFunction::makeFallthrough() to DispatchKey::Autograd. (Triggered internally at fbcode/caffe2/torch/csrc/autograd/autograd_not_implemented_fallback.cpp:72.) ``` (b) Sometimes we would get aot_autograd partitioner issues because this op would not show up as an op returning a tensor Previous issue: a single implementation for both CPU and Autograd was registered, which would call DenseToJaggedOp::apply(); a separate CUDA implementation was registered which did not have a backward registration. Updated implementation: - added a CPU implementation which does `jagged + dense_to_jagged(dense, offsets)` - added an AutogradFunction implementation, which: in forward, redispatches to jagged_dense_elementwise_add_jagged_output; and in backward, redispatches to jagged_to_dense. Differential Revision: D53650907 Pulled By: davidberard98
ac73a2a to
2d8c179
Compare
|
This pull request was exported from Phabricator. Differential Revision: D53650907 |
…ytorch#2327) Summary: This op previously didn't have an autograd registration. a) We would see this warning: ``` /data/users/dberard/fbsource/buck-out/v2/gen/fbcode/6f27a84d3075b0d5/scripts/dberard/jplusd/__jagged_plus_dense__/jagged_plus_dense#link-tree/torch/autograd/graph.py:744: UserWarning: fbgemm::jagged_dense_elementwise_add_jagged_output: an autograd kernel was not registered to the Autograd key(s) but we are trying to backprop through it. This may lead to silently incorrect behavior. This behavior is deprecated and will be removed in a future version of PyTorch. If your operator is differentiable, please ensure you have registered an autograd kernel to the correct Autograd key (e.g. DispatchKey::Autograd, DispatchKey::CompositeImplicitAutograd). If your operator is not differentiable, or to squash this warning and use the previous behavior, please register torch::CppFunction::makeFallthrough() to DispatchKey::Autograd. (Triggered internally at fbcode/caffe2/torch/csrc/autograd/autograd_not_implemented_fallback.cpp:72.) ``` (b) Sometimes we would get aot_autograd partitioner issues because this op would not show up as an op returning a tensor Previous issue: a single implementation for both CPU and Autograd was registered, which would call DenseToJaggedOp::apply(); a separate CUDA implementation was registered which did not have a backward registration. Updated implementation: - added a CPU implementation which does `jagged + dense_to_jagged(dense, offsets)` - added an AutogradFunction implementation, which: in forward, redispatches to jagged_dense_elementwise_add_jagged_output; and in backward, redispatches to jagged_to_dense. Reviewed By: williamwen42 Differential Revision: D53650907 Pulled By: davidberard98
2d8c179 to
1caf966
Compare
…ytorch#2327) Summary: This op previously didn't have an autograd registration. a) We would see this warning: ``` /data/users/dberard/fbsource/buck-out/v2/gen/fbcode/6f27a84d3075b0d5/scripts/dberard/jplusd/__jagged_plus_dense__/jagged_plus_dense#link-tree/torch/autograd/graph.py:744: UserWarning: fbgemm::jagged_dense_elementwise_add_jagged_output: an autograd kernel was not registered to the Autograd key(s) but we are trying to backprop through it. This may lead to silently incorrect behavior. This behavior is deprecated and will be removed in a future version of PyTorch. If your operator is differentiable, please ensure you have registered an autograd kernel to the correct Autograd key (e.g. DispatchKey::Autograd, DispatchKey::CompositeImplicitAutograd). If your operator is not differentiable, or to squash this warning and use the previous behavior, please register torch::CppFunction::makeFallthrough() to DispatchKey::Autograd. (Triggered internally at fbcode/caffe2/torch/csrc/autograd/autograd_not_implemented_fallback.cpp:72.) ``` (b) Sometimes we would get aot_autograd partitioner issues because this op would not show up as an op returning a tensor Previous issue: a single implementation for both CPU and Autograd was registered, which would call DenseToJaggedOp::apply(); a separate CUDA implementation was registered which did not have a backward registration. Updated implementation: - added a CPU implementation which does `jagged + dense_to_jagged(dense, offsets)` - added an AutogradFunction implementation, which: in forward, redispatches to jagged_dense_elementwise_add_jagged_output; and in backward, redispatches to jagged_to_dense. Reviewed By: williamwen42 Differential Revision: D53650907 Pulled By: davidberard98
1caf966 to
70ee8b0
Compare
|
This pull request was exported from Phabricator. Differential Revision: D53650907 |
|
@davidberard98 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
…ytorch#2327) Summary: This op previously didn't have an autograd registration. a) We would see this warning: ``` /data/users/dberard/fbsource/buck-out/v2/gen/fbcode/6f27a84d3075b0d5/scripts/dberard/jplusd/__jagged_plus_dense__/jagged_plus_dense#link-tree/torch/autograd/graph.py:744: UserWarning: fbgemm::jagged_dense_elementwise_add_jagged_output: an autograd kernel was not registered to the Autograd key(s) but we are trying to backprop through it. This may lead to silently incorrect behavior. This behavior is deprecated and will be removed in a future version of PyTorch. If your operator is differentiable, please ensure you have registered an autograd kernel to the correct Autograd key (e.g. DispatchKey::Autograd, DispatchKey::CompositeImplicitAutograd). If your operator is not differentiable, or to squash this warning and use the previous behavior, please register torch::CppFunction::makeFallthrough() to DispatchKey::Autograd. (Triggered internally at fbcode/caffe2/torch/csrc/autograd/autograd_not_implemented_fallback.cpp:72.) ``` (b) Sometimes we would get aot_autograd partitioner issues because this op would not show up as an op returning a tensor Previous issue: a single implementation for both CPU and Autograd was registered, which would call DenseToJaggedOp::apply(); a separate CUDA implementation was registered which did not have a backward registration. Updated implementation: - added a CPU implementation which does `jagged + dense_to_jagged(dense, offsets)` - added an AutogradFunction implementation, which: in forward, redispatches to jagged_dense_elementwise_add_jagged_output; and in backward, redispatches to jagged_to_dense. Reviewed By: williamwen42 Differential Revision: D53650907 Pulled By: davidberard98
70ee8b0 to
10fafe8
Compare
|
This pull request was exported from Phabricator. Differential Revision: D53650907 |
|
@davidberard98 merged this pull request in 0c43bee. |
Summary:
This op previously didn't have an autograd registration.
a) We would see this warning:
(b) Sometimes we would get aot_autograd partitioner issues because this op would not show up as an op returning a tensor
Previous issue: a single implementation for both CPU and Autograd was registered, which would call DenseToJaggedOp::apply(); a separate CUDA implementation was registered which did not have a backward registration.
Updated implementation:
jagged + dense_to_jagged(dense, offsets)Differential Revision: D53650907