diff --git a/build_tools/download_peano.ps1 b/build_tools/download_peano.ps1 index 98b8cf982..101aa2106 100644 --- a/build_tools/download_peano.ps1 +++ b/build_tools/download_peano.ps1 @@ -6,6 +6,7 @@ $ErrorActionPreference = 'Stop' -$RELEASE = "19.0.0.2024082221+90abe71b" +$this_dir = Split-Path -Path $MyInvocation.MyCommand.Path -Parent +$RELEASE = (Get-Content Resolve-Path -Path "$this_dir/peano_commit.txt") pip download llvm_aie==$RELEASE -f https://github.com/Xilinx/llvm-aie/releases/expanded_assets/nightly Expand-Archive (Get-ChildItem -Filter llvm*.whl).FullName -DestinationPath $PWD.Path diff --git a/build_tools/download_peano.sh b/build_tools/download_peano.sh index d42e1777b..43b3c3cf2 100644 --- a/build_tools/download_peano.sh +++ b/build_tools/download_peano.sh @@ -6,6 +6,7 @@ # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -RELEASE=19.0.0.2024092601+562ccea2 +this_dir="$(cd $(dirname $0) && pwd)" +RELEASE=$(cat $this_dir/peano_commit.txt) pip download llvm_aie==$RELEASE -f https://github.com/Xilinx/llvm-aie/releases/expanded_assets/nightly unzip llvm_aie*whl diff --git a/build_tools/peano_commit.txt b/build_tools/peano_commit.txt new file mode 100644 index 000000000..d6d5007c1 --- /dev/null +++ b/build_tools/peano_commit.txt @@ -0,0 +1 @@ +19.0.0.2024092601+562ccea2 \ No newline at end of file diff --git a/tests/test_matmul.py b/tests/test_matmul.py index b58fc42e8..598bfdcab 100644 --- a/tests/test_matmul.py +++ b/tests/test_matmul.py @@ -21,8 +21,8 @@ def matmul_i8_i32(lhs, rhs): v1 = linalg.fill(cst, outs=[v0]) return linalg.matmul(lhs, rhs, outs=[v1]) - arg0 = np.ones((32, 16), dtype=np.int8) - arg1 = np.ones((16, 32), dtype=np.int8) + arg0 = np.random.randint(-1, 3, (32, 16), dtype=np.int8) + arg1 = np.random.randint(-1, 3, (16, 32), dtype=np.int8) with invokable_module(session, module, device) as module: results = module[matmul_i8_i32.__name__](arg0, arg1).to_host() assert np.array_equal(results, arg0 @ arg1) @@ -144,8 +144,8 @@ def test_matmul( lhs_rhs_type = mlir_type_to_np_dtype(lhs_rhs_type) acc_type = mlir_type_to_np_dtype(acc_type) - arg0 = np.random.randint(-1, 1, (M, K), dtype=lhs_rhs_type) - arg1 = np.random.randint(-1, 1, (K, N), dtype=lhs_rhs_type) + arg0 = np.random.randint(-1, 3, (M, K), dtype=lhs_rhs_type) + arg1 = np.random.randint(-1, 3, (K, N), dtype=lhs_rhs_type) with invokable_module(session, module, device) as module: for i in range(num_repeat_runs): results = module[matmul_name](arg0, arg1).to_host()