torch-mlir icon indicating copy to clipboard operation
torch-mlir copied to clipboard

Support for Byte datatype

Open AmosLewis opened this issue 3 years ago • 3 comments

I am trying to lower GPT2 torch model to linalg in this link: https://github.com/nod-ai/SHARK/pull/341 https://github.com/nod-ai/SHARK/issues/337 but get the following bug.

File "torch-mlir/build/tools/torch-mlir/python_packages/torch_mlir/torch_mlir/__init__.py", line 233, in compile
      mb.import_module(scripted._c, class_annotator, import_options)
  raise Exception(f"""
Exception: 
PyTorch TorchScript module -> torch-mlir Object Graph IR import failed with:
### Importer C++ Exception:
Unsupported import tensor type: (1,1,.,.) .....
[ CPUByteType{1,1,1024,1024} ]

I am planning to add a datatype of Byte just like this patch https://github.com/llvm/torch-mlir/pull/1169? Any suggestion @silvasean?

AmosLewis avatar Sep 19 '22 16:09 AmosLewis

SGTM!

silvasean avatar Sep 19 '22 17:09 silvasean

SGTM!

Could you add me as a LLVM contributor, so I can PR my code?

AmosLewis avatar Sep 19 '22 17:09 AmosLewis

Can we close this? #1384 landed.

silvasean avatar Oct 07 '22 13:10 silvasean