Nvfuser guard patch#75016
Conversation
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit 1b0b917 (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).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
| (guard_tensor_type->device().value() != tensor.device())) || | ||
| (guard_tensor_type->requiresGrad().has_value() && | ||
| guard_tensor_type->requiresGrad().value() != tensor.requires_grad())) { | ||
| guard_tensor_type->requiresGrad().value() != |
There was a problem hiding this comment.
Thanks for making me feel better~
|
have some failing tests |
|
@eellison has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
@pytorchbot merge this please |
|
Hey @jjsjann123. |
|
@pytorchbot revert this |
This reverts commit d86181f. Reverted #75016 on behalf of https://github.com/malfet
|
sorry didn't notice this when I landed the ci stuff, @jjsjann123 could you rebase this and also change |
|
Oh, so it needed to be reverted anyway ;) |
|
yeah, either this or the CI changes would have needed to be reverted |
|
Will reland in #75303 if @jjsjann123 doesn't mind :) |
ohohoh, somehow haven't got back to this one. Thanks for taking care of it. |
|
np - useful for me :) |
Reland of #75016 with `USE_CUDA` => `USE_NVFUSER` Pull Request resolved: #75303 Approved by: https://github.com/jjsjann123, https://github.com/davidberard98
Summary: Reland of #75016 with `USE_CUDA` => `USE_NVFUSER` Pull Request resolved: #75303 Approved by: https://github.com/jjsjann123, https://github.com/davidberard98 Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/5994d684840a6b3be37bfa033af92c891ba257a6 Reviewed By: b0noI, davidberard98 Differential Revision: D35420569 Pulled By: Chillee fbshipit-source-id: e25a26b85f5056ba7b5b73448b03aa9926ce00df
Fixes issue where CudaFusionGuard would return false on backward graph because `requires_grad` flag doesn't match. This is due to the fact that autodiff uses GradMode switch to turn on/off requires_grad, which is not taken into consideration by nvfuser guard. We verified the implementation under `TensorType::matchTensor`. - [x] Add python test to verify no fallback is observed Pull Request resolved: pytorch/pytorch#75016 Approved by: https://github.com/eellison
This reverts commit 685e552. Reverted pytorch/pytorch#75016 on behalf of https://github.com/malfet
Reland of pytorch/pytorch#75016 with `USE_CUDA` => `USE_NVFUSER` Pull Request resolved: pytorch/pytorch#75303 Approved by: https://github.com/jjsjann123, https://github.com/davidberard98
Fixes issue where CudaFusionGuard would return false on backward graph because `requires_grad` flag doesn't match. This is due to the fact that autodiff uses GradMode switch to turn on/off requires_grad, which is not taken into consideration by nvfuser guard. We verified the implementation under `TensorType::matchTensor`. - [x] Add python test to verify no fallback is observed Pull Request resolved: pytorch/pytorch#75016 Approved by: https://github.com/eellison
This reverts commit bc31a2b. Reverted pytorch/pytorch#75016 on behalf of https://github.com/malfet
Reland of pytorch/pytorch#75016 with `USE_CUDA` => `USE_NVFUSER` Pull Request resolved: pytorch/pytorch#75303 Approved by: https://github.com/jjsjann123, https://github.com/davidberard98
Fixes issue where CudaFusionGuard would return false on backward graph because `requires_grad` flag doesn't match. This is due to the fact that autodiff uses GradMode switch to turn on/off requires_grad, which is not taken into consideration by nvfuser guard. We verified the implementation under `TensorType::matchTensor`. - [x] Add python test to verify no fallback is observed Pull Request resolved: pytorch#75016 Approved by: https://github.com/eellison
This reverts commit d0ce1d1. Reverted pytorch#75016 on behalf of https://github.com/malfet
Reland of pytorch#75016 with `USE_CUDA` => `USE_NVFUSER` Pull Request resolved: pytorch#75303 Approved by: https://github.com/jjsjann123, https://github.com/davidberard98
Fixes issue where CudaFusionGuard would return false on backward graph because
requires_gradflag doesn't match.This is due to the fact that autodiff uses GradMode switch to turn on/off requires_grad, which is not taken into consideration by nvfuser guard. We verified the implementation under
TensorType::matchTensor.