Skip to content

bug for torch/quantization/tensor_quant.py #221

@666DZY666

Description

@666DZY666

https://github.com/NVIDIA/TensorRT-Model-Optimizer/blob/0.31.0/modelopt/torch/quantization/tensor_quant.py#L301

/root/anaconda3/lib/python3.10/site-packages/torch/jit/_script.py", line 1381, in script
fn = torch._C._jit_script_compile(
RuntimeError:
Expression of type | cannot be used in a type expression:
@torch.jit.script
def _fake_tensor_quant_backward(inputs, amax: torch.Tensor | None, grad_outputs):

"amax: torch.Tensor | None" is error

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions