mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
Revert "refactor lazy init to device-agnostic (#118846)"
This reverts commit 520771d7b35034c96c5b4604ecf8960e6aab856f. Reverted https://github.com/pytorch/pytorch/pull/118846 on behalf of https://github.com/atalman due to Failing, tests https://github.com/pytorch/torchdistx/blob/main/src/python/torchdistx/_C/fake.cc#L11 ([comment](https://github.com/pytorch/pytorch/pull/118846#issuecomment-1927651305))
This commit is contained in:
@ -1443,7 +1443,7 @@ const auto options = TensorOptions()
|
||||
.layout({arg_parser_outputs['layout'].expr})
|
||||
.requires_grad({arg_parser_outputs['requires_grad'].expr})
|
||||
.pinned_memory({arg_parser_outputs['pin_memory'].expr});
|
||||
torch::utils::maybe_initialize_device(options);
|
||||
torch::utils::maybe_initialize_cuda(options);
|
||||
"""
|
||||
)
|
||||
lambda_args_exprs["options"] = "options"
|
||||
|
Reference in New Issue
Block a user