From f0ed9e2d8d21c6e97df863b93a956b6c43a10b8a Mon Sep 17 00:00:00 2001 From: Sean Silva Date: Wed, 29 Sep 2021 23:52:20 +0000 Subject: [PATCH] Fix update_torch_ods.sh --- build_tools/update_torch_ods.sh | 6 +++--- include/torch-mlir/Dialect/Torch/IR/GeneratedAtenOps.td | 1 + include/torch-mlir/Dialect/Torch/IR/GeneratedPrimOps.td | 1 + .../torch-mlir/Dialect/Torch/IR/GeneratedQuantizedOps.td | 1 + .../torch/importer/jit_ir/build_tools/torch_ods_gen.py | 4 ++-- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/build_tools/update_torch_ods.sh b/build_tools/update_torch_ods.sh index 8e1de9602..25ae1a443 100755 --- a/build_tools/update_torch_ods.sh +++ b/build_tools/update_torch_ods.sh @@ -2,10 +2,10 @@ # Updates auto-generated ODS files for the `torch` dialect. set -e -src_dir="$(realpath $(dirname $0)/../../..)" +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" +torch_ir_dir="${src_dir}/include/torch-mlir/Dialect/Torch/IR" +python_packages_dir="${build_dir}/tools/torch-mlir/python_packages" #ninja -C "${build_dir}" PYTHONPATH="${python_packages_dir}/torch_mlir" python \ diff --git a/include/torch-mlir/Dialect/Torch/IR/GeneratedAtenOps.td b/include/torch-mlir/Dialect/Torch/IR/GeneratedAtenOps.td index 8b332cd17..fbab9b5d6 100644 --- a/include/torch-mlir/Dialect/Torch/IR/GeneratedAtenOps.td +++ b/include/torch-mlir/Dialect/Torch/IR/GeneratedAtenOps.td @@ -2438,3 +2438,4 @@ def Torch_AtenEqDeviceOp : Torch_Op<"aten.eq.device", [ ); let assemblyFormat = "$a `,` $b attr-dict `:` type($a) `,` type($b) `->` type($result)"; } + diff --git a/include/torch-mlir/Dialect/Torch/IR/GeneratedPrimOps.td b/include/torch-mlir/Dialect/Torch/IR/GeneratedPrimOps.td index 12cb0edf7..3720083f1 100644 --- a/include/torch-mlir/Dialect/Torch/IR/GeneratedPrimOps.td +++ b/include/torch-mlir/Dialect/Torch/IR/GeneratedPrimOps.td @@ -224,3 +224,4 @@ def Torch_PrimTolistOp : Torch_Op<"prim.tolist", [ ); let assemblyFormat = "`(` $operands `)` attr-dict `:` type($operands) `->` type($results)"; } + diff --git a/include/torch-mlir/Dialect/Torch/IR/GeneratedQuantizedOps.td b/include/torch-mlir/Dialect/Torch/IR/GeneratedQuantizedOps.td index ae6390542..c3c05d37a 100644 --- a/include/torch-mlir/Dialect/Torch/IR/GeneratedQuantizedOps.td +++ b/include/torch-mlir/Dialect/Torch/IR/GeneratedQuantizedOps.td @@ -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)"; } + diff --git a/python/torch_mlir/dialects/torch/importer/jit_ir/build_tools/torch_ods_gen.py b/python/torch_mlir/dialects/torch/importer/jit_ir/build_tools/torch_ods_gen.py index a760d63bc..0afff9e33 100644 --- a/python/torch_mlir/dialects/torch/importer/jit_ir/build_tools/torch_ods_gen.py +++ b/python/torch_mlir/dialects/torch/importer/jit_ir/build_tools/torch_ods_gen.py @@ -265,8 +265,8 @@ ODS_BANNER = "\n".join([ "//", "// This file is licensed under the Apache License v2.0 with LLVM Exceptions.", "// See https://llvm.org/LICENSE.txt for license information.", - "// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// Also available under a BSD-style license. See LICENSE.", + "// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception", + "// Also available under a BSD-style license. See LICENSE.", "//", "// Operation summaries and descriptions were systematically derived from public", "// API docstrings and are licensed accordingly:",