Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
makslevental committed Oct 1, 2024
1 parent 3db0a06 commit a936db5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion build_tools/download_peano.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion build_tools/download_peano.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions build_tools/peano_commit.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
19.0.0.2024092601+562ccea2
8 changes: 4 additions & 4 deletions tests/test_matmul.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit a936db5

Please sign in to comment.