[nativert] Move Weights to PyTorch core (#155156)

Summary:
Moves Weights class to PyTorch core
Torch Native Runtime RFC: pytorch/rfcs#72
 README: https://github.com/pytorch/pytorch/blob/main/torch/nativert/OVERVIEW.md

Test Plan: buck2 run mode/dev-nosan caffe2/test/cpp/nativert:weights_test

Differential Revision: D75973156

Pull Request resolved: https://github.com/pytorch/pytorch/pull/155156
Approved by: https://github.com/zhxchen17
This commit is contained in:
Yiming Zhou
2025-06-09 05:49:32 +00:00
committed by PyTorch MergeBot
parent 6fb6293159
commit 9b4a748e29
5 changed files with 678 additions and 0 deletions

View File

@ -596,6 +596,7 @@ libtorch_nativert_sources = [
"torch/nativert/graph/TensorMeta.cpp",
"torch/nativert/executor/Placement.cpp",
"torch/nativert/executor/PlacementUtils.cpp",
"torch/nativert/executor/Weights.cpp",
"torch/nativert/executor/memory/FunctionSchema.cpp",
"torch/nativert/common/FileUtil.cpp",
]