-
Notifications
You must be signed in to change notification settings - Fork 25.3k
Description
🐛 Describe the bug
Hi,
Attempting to export this model to onnx. Export keeps failing:
torch.onnx.errors.UnsupportedOperatorError: Exporting the operator 'aten::lift_fresh' to ONNX opset version 17 is not supported. Please feel free to request support or submit a pull request on PyTorch GitHub: https://github.com/pytorch/pytorch/issues.
Tried with lower and higher opset versions, same failure.
Code:
wrapperpolicy = PolicyWrapper(policy)
dummy_obs = torch.randn(56, 2, 20, dtype=torch.float32)
dummy_mask = torch.ones(56, 2, 20, dtype=torch.bool)
onnx_model_path = "/proj/work/kraza/git/diffusion_policy_cnn_stanford/DynamoWrapperDiffusionPolicyCNN.onnx"
print("starting onnx export\n\n")
torch.onnx.export(wrapperpolicy, (dummy_obs, dummy_mask), onnx_model_path, opset_version=17, input_names=["input_node"], output_names=["output_node"], report=True, export_params=True)
Error:
:: # /proj/work/kraza/git/diffusion_policy_cnn_stanford/diffusion_policy/diffusion_policy/policy/diffusion_unet_lowdim_policy.py:165:0
return (%1270965)
Traceback (most recent call last):
File "/proj/work/kraza/git/diffusion_policy_cnn_stanford/diffusion_policy/eval_dynamo_mlir_compile_v2_onnx_wrapper.py", line 105, in
main()
File "/proj/work/kraza/git/mlir-compiler2/mlir-compiler/venv/lib/python3.10/site-packages/click/core.py", line 1128, in call
return self.main(*args, **kwargs)
File "/proj/work/kraza/git/mlir-compiler2/mlir-compiler/venv/lib/python3.10/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/proj/work/kraza/git/mlir-compiler2/mlir-compiler/venv/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/proj/work/kraza/git/mlir-compiler2/mlir-compiler/venv/lib/python3.10/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/proj/work/kraza/git/diffusion_policy_cnn_stanford/diffusion_policy/eval_dynamo_mlir_compile_v2_onnx_wrapper.py", line 82, in main
torch.onnx.export(wrapperpolicy, (dummy_obs, dummy_mask), onnx_model_path, opset_version=17, input_names=["input_node"], output_names=["output_node"], report=True, export_params=True)
File "/proj/work/kraza/git/mlir-compiler2/mlir-compiler/venv/lib/python3.10/site-packages/torch/onnx/init.py", line 383, in export
export(
File "/proj/work/kraza/git/mlir-compiler2/mlir-compiler/venv/lib/python3.10/site-packages/torch/onnx/utils.py", line 495, in export
_export(
File "/proj/work/kraza/git/mlir-compiler2/mlir-compiler/venv/lib/python3.10/site-packages/torch/onnx/utils.py", line 1428, in _export
graph, params_dict, torch_out = _model_to_graph(
File "/proj/work/kraza/git/mlir-compiler2/mlir-compiler/venv/lib/python3.10/site-packages/torch/onnx/utils.py", line 1057, in _model_to_graph
graph = _optimize_graph(
File "/proj/work/kraza/git/mlir-compiler2/mlir-compiler/venv/lib/python3.10/site-packages/torch/onnx/utils.py", line 632, in _optimize_graph
graph = _C._jit_pass_onnx(graph, operator_export_type)
File "/proj/work/kraza/git/mlir-compiler2/mlir-compiler/venv/lib/python3.10/site-packages/torch/onnx/utils.py", line 1709, in _run_symbolic_function
raise errors.UnsupportedOperatorError(
torch.onnx.errors.UnsupportedOperatorError: Exporting the operator 'aten::lift_fresh' to ONNX opset version 17 is not supported. Please feel free to request support or submit a pull request on PyTorch GitHub: https://github.com/pytorch/pytorch/issues.
Versions
Environment:
Collecting environment information...
PyTorch version: 2.6.0+cpu
Is debug build: False
CUDA used to build PyTorch: Could not collect
ROCM used to build PyTorch: N/A
OS: Ubuntu 22.04.4 LTS (aarch64)
GCC version: (GCC) 13.3.0
Clang version: 14.0.0-1ubuntu1.1
CMake version: version 3.29.6
Libc version: glibc-2.35
Python version: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] (64-bit runtime)
Python platform: Linux-6.5.0-1019-nvidia-64k-aarch64-with-glibc2.35
Is CUDA available: False
CUDA runtime version: 11.5.119
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: GPU 0: NVIDIA GH200 480GB
Nvidia driver version: 550.90.07
cuDNN version: Probably one of the following:
/usr/lib/aarch64-linux-gnu/libcudnn.so.9.3.0
/usr/lib/aarch64-linux-gnu/libcudnn_adv.so.9.3.0
/usr/lib/aarch64-linux-gnu/libcudnn_cnn.so.9.3.0
/usr/lib/aarch64-linux-gnu/libcudnn_engines_precompiled.so.9.3.0
/usr/lib/aarch64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.3.0
/usr/lib/aarch64-linux-gnu/libcudnn_graph.so.9.3.0
/usr/lib/aarch64-linux-gnu/libcudnn_heuristic.so.9.3.0
/usr/lib/aarch64-linux-gnu/libcudnn_ops.so.9.3.0
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
CPU:
Architecture: aarch64
CPU op-mode(s): 64-bit
Byte Order: Little Endian
CPU(s): 72
On-line CPU(s) list: 0-71
Vendor ID: ARM
Model name: Neoverse-V2
Model: 0
Thread(s) per core: 1
Core(s) per socket: 72
Socket(s): 1
Stepping: r0p0
Frequency boost: disabled
CPU max MHz: 3375.0000
CPU min MHz: 81.0000
BogoMIPS: 2000.00
Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh bti
L1d cache: 4.5 MiB (72 instances)
L1i cache: 4.5 MiB (72 instances)
L2 cache: 72 MiB (72 instances)
L3 cache: 114 MiB (1 instance)
NUMA node(s): 9
NUMA node0 CPU(s): 0-71
NUMA node1 CPU(s):
NUMA node2 CPU(s):
NUMA node3 CPU(s):
NUMA node4 CPU(s):
NUMA node5 CPU(s):
NUMA node6 CPU(s):
NUMA node7 CPU(s):
NUMA node8 CPU(s):
Vulnerability Gather data sampling: Not affected
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Not affected
Vulnerability Retbleed: Not affected
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1: Mitigation; __user pointer sanitization
Vulnerability Spectre v2: Not affected
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
Versions of relevant libraries:
[pip3] mypy-extensions==1.0.0
[pip3] numpy==1.23.3
[pip3] onnx==1.17.0
[pip3] onnxruntime-training==1.20.0+cpu
[pip3] onnxscript==0.2.3
[pip3] torch==2.6.0
[pip3] torchvision==0.13.1
[conda] Could not collect