build: manually update PyTorch version (#2992)

Set PyTorch and TorchVision version to nightly release 2024-03-07.
This commit also removes the deprecated constraints API:
342e7929b8

Signed-Off By: Vivek Khandelwal <vivekkhandelwal1424@gmail.com>
pull/2995/head
Vivek Khandelwal 2024-03-07 21:42:38 +05:30 committed by GitHub
parent d5693b3f51
commit 6e84752c39
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 11 additions and 7 deletions

View File

@ -2167,7 +2167,6 @@ ONNX_XFAIL_SET = {
"ElementwiseTanIntModule_basic",
"ElementwiseUnaryIntModule_basic",
"ElementwiseUnsqueezeNegDimsModule_basic",
"ElementwiseWhereScalarModule_basic",
"EmbeddingModuleF16_basic",
"EmbeddingModuleI32_basic",
"EmbeddingModuleI64_basic",
@ -2192,5 +2191,11 @@ ONNX_XFAIL_SET = {
"TensorsStackPromoteDTypeModule_basic",
}
if torch_version_for_comparison() < version.parse("2.3.0.dev"):
ONNX_XFAIL_SET = ONNX_XFAIL_SET | {
# ERROR: dtype (torch.float64) is not equal to golden dtype (torch.float32)
"ElementwiseWhereScalarModule_basic",
}
ONNX_CRASHING_SET = { }

View File

@ -20,7 +20,6 @@ def export_and_import(
f,
*args,
fx_importer: Optional[FxImporter] = None,
constraints: Optional[torch.export.Constraint] = None,
experimental_support_mutation: bool = False,
hooks: Optional[FxImporterHooks] = None,
func_name: str = "main",
@ -31,7 +30,7 @@ def export_and_import(
if fx_importer is None:
fx_importer = FxImporter(context=context, hooks=hooks)
prog = torch.export.export(f, args, kwargs, constraints=constraints)
prog = torch.export.export(f, args, kwargs)
decomp_table = get_decomposition_table()
prog = prog.run_decompositions(decomp_table)
if experimental_support_mutation:

View File

@ -1 +1 @@
8efa066dc0870521652c1319bd6b5b0f6dc3fe25
ce013333221ff2d1285a8e8cf7c427584e65fea2

View File

@ -1,3 +1,3 @@
-f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
--pre
torch==2.3.0.dev20240220
torch==2.3.0.dev20240307

View File

@ -104,7 +104,7 @@ def sparse_export(
mask = [a.layout in SPARSE_LAYOUTS for a in args]
# Build the regular FX traced graph with only dense arguments
# (the current version would crash otherwise, see issue above).
prog = torch.export.export(f, dargs, kwargs, constraints=None)
prog = torch.export.export(f, dargs, kwargs)
# Annotate sparse arguments in the graph. Note that we currently
# only account for sparsity defined by the user inputs to the model.
# TODO: support sparsity in model parameters (weights, biases)

View File

@ -1,3 +1,3 @@
-f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
--pre
torchvision==0.18.0.dev20240220
torchvision==0.18.0.dev20240307