Fix update_torch_ods.sh

pull/346/head
Sean Silva 2021-09-29 23:52:20 +00:00
parent 5b6902e31c
commit f0ed9e2d8d
5 changed files with 8 additions and 5 deletions

View File

@ -2,10 +2,10 @@
# Updates auto-generated ODS files for the `torch` dialect. # Updates auto-generated ODS files for the `torch` dialect.
set -e set -e
src_dir="$(realpath $(dirname $0)/../../..)" src_dir="$(realpath $(dirname $0)/..)"
build_dir="$(realpath "${TORCH_MLIR_BUILD_DIR:-$src_dir/build}")" build_dir="$(realpath "${TORCH_MLIR_BUILD_DIR:-$src_dir/build}")"
torch_ir_dir="${src_dir}/external/torch-mlir/include/torch-mlir/Dialect/Torch/IR" torch_ir_dir="${src_dir}/include/torch-mlir/Dialect/Torch/IR"
python_packages_dir="${build_dir}/python_packages" python_packages_dir="${build_dir}/tools/torch-mlir/python_packages"
#ninja -C "${build_dir}" #ninja -C "${build_dir}"
PYTHONPATH="${python_packages_dir}/torch_mlir" python \ PYTHONPATH="${python_packages_dir}/torch_mlir" python \

View File

@ -2438,3 +2438,4 @@ def Torch_AtenEqDeviceOp : Torch_Op<"aten.eq.device", [
); );
let assemblyFormat = "$a `,` $b attr-dict `:` type($a) `,` type($b) `->` type($result)"; let assemblyFormat = "$a `,` $b attr-dict `:` type($a) `,` type($b) `->` type($result)";
} }

View File

@ -224,3 +224,4 @@ def Torch_PrimTolistOp : Torch_Op<"prim.tolist", [
); );
let assemblyFormat = "`(` $operands `)` attr-dict `:` type($operands) `->` type($results)"; let assemblyFormat = "`(` $operands `)` attr-dict `:` type($operands) `->` type($results)";
} }

View File

@ -33,3 +33,4 @@ def Torch_QuantizedLinearOp : Torch_Op<"quantized.linear", [
); );
let assemblyFormat = "$X `,` $W_prepack `,` $Y_scale_i `,` $Y_zero_point_i attr-dict `:` type($X) `,` type($W_prepack) `,` type($Y_scale_i) `,` type($Y_zero_point_i) `->` type($Y)"; let assemblyFormat = "$X `,` $W_prepack `,` $Y_scale_i `,` $Y_zero_point_i attr-dict `:` type($X) `,` type($W_prepack) `,` type($Y_scale_i) `,` type($Y_zero_point_i) `->` type($Y)";
} }

View File

@ -265,8 +265,8 @@ ODS_BANNER = "\n".join([
"//", "//",
"// This file is licensed under the Apache License v2.0 with LLVM Exceptions.", "// This file is licensed under the Apache License v2.0 with LLVM Exceptions.",
"// See https://llvm.org/LICENSE.txt for license information.", "// See https://llvm.org/LICENSE.txt for license information.",
"// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception "// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception",
// Also available under a BSD-style license. See LICENSE.", "// Also available under a BSD-style license. See LICENSE.",
"//", "//",
"// Operation summaries and descriptions were systematically derived from public", "// Operation summaries and descriptions were systematically derived from public",
"// API docstrings and are licensed accordingly:", "// API docstrings and are licensed accordingly:",