mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Remind about AutoNonVariableTypeMode in error message. (#51655)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/51655 Test Plan: Imported from OSS Reviewed By: bhosmer Differential Revision: D26228508 Pulled By: ailzhang fbshipit-source-id: f5f48fde3611c84cc6473b77824ebf9dffbb4453
This commit is contained in:
committed by
Facebook GitHub Bot
parent
2303c244fc
commit
034a007ad8
@ -24,7 +24,10 @@ void ambiguous_autogradother_kernel(OperatorKernel*, const OperatorHandle& op, D
|
||||
op.operator_name(), " has kernels registered to both Math and a backend mapped to AutogradOther. "
|
||||
"This makes the backend kernel unreachable (see Note [Ambiguity in AutogradOther kernel]). "
|
||||
"If it's intended to override Math kernel behavior, please open an issue to request a dedicated "
|
||||
"Autograd dispatch key for the backend.", "\nCanonical state\n~~~~~~~~~~~\n", op.dumpState(), "\n\n");
|
||||
"Autograd dispatch key for the backend.\n",
|
||||
"If you only want to run inference instead of training, add `at::AutoNonVariableTypeMode guard(true);` "
|
||||
"before model.forward(). Note this guard is only available in C++ but not Python at present.",
|
||||
"\nCanonical state\n~~~~~~~~~~~\n", op.dumpState(), "\n\n");
|
||||
}
|
||||
|
||||
void named_not_supported_kernel(OperatorKernel*, const OperatorHandle& op, DispatchKeySet, Stack*) {
|
||||
|
Reference in New Issue
Block a user