mirror of https://github.com/llvm/torch-mlir
15 lines
588 B
Bash
15 lines
588 B
Bash
#!/bin/bash
|
|
# Updates auto-generated ODS files for the `torch` dialect.
|
|
set -e
|
|
|
|
src_dir="$(realpath $(dirname $0)/../../..)"
|
|
build_dir="$(realpath "${TORCH_MLIR_BUILD_DIR:-$src_dir/build}")"
|
|
torch_ir_dir="${src_dir}/external/torch-mlir/include/torch-mlir/Dialect/Torch/IR"
|
|
python_packages_dir="${build_dir}/python_packages"
|
|
|
|
#ninja -C "${build_dir}"
|
|
PYTHONPATH="${python_packages_dir}/torch_mlir" python \
|
|
-m torch_mlir.dialects.torch.importer.jit_ir.build_tools.torch_ods_gen \
|
|
--torch_ir_dir="${torch_ir_dir}" \
|
|
--debug_registry_dump="${torch_ir_dir}/JITOperatorRegistryDump.txt"
|