Skip to content

Commit

Permalink
incorporate comments
Browse files Browse the repository at this point in the history
  • Loading branch information
makslevental committed Jul 26, 2024
1 parent 3ed9460 commit f0aa863
Show file tree
Hide file tree
Showing 4 changed files with 256 additions and 282 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ jobs:
# install requirements
# TODO(newling) make requirements.txt file
pip install numpy
source /opt/xilinx/xrt/setup.sh
python3 build_tools/ci/cpu_comparison/run_test.py test_aie_vs_cpu iree-install $PWD/llvm-aie
- name: Printing IR from aie2xclbin
Expand Down
Empty file.
13 changes: 7 additions & 6 deletions build_tools/ci/cpu_comparison/input_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,8 @@ def generate_inputs(filename, write_dir, seed):
line = line.strip()
tokens = line.split()
if len(tokens) > 2 and tokens[0] == "//":

# Lines of the form '// input 3x40xf32'
if tokens[1] == "input":

sub_tokens = tokens[2].split("x")
element_type = sub_tokens[-1]

Expand All @@ -192,7 +190,12 @@ def generate_inputs(filename, write_dir, seed):
bin_filename = os.path.join(
write_dir, name + "_input" + str(input_number) + ".bin"
)
input_args.append('--input="%s=@%s"' % (tokens[2], bin_filename))
if re.search(r"\s", str(bin_filename)):
raise RuntimeError(
f"input {tokens[2]}={bin_filename} has a space in the filename, which is not supported"
)

input_args.append(f"--input={tokens[2]}=@{bin_filename}")
# Each input has a distinct seed, based on its input number.
# This is to ensure that operands are not populated with the
# same values.
Expand Down Expand Up @@ -238,6 +241,4 @@ def generate_inputs(filename, write_dir, seed):
f"{func_num_inputs}"
)

command_flags = " ".join(input_args)
return command_flags

return input_args
Loading

0 comments on commit f0aa863

Please sign in to comment.