Skip to content

Commit

Permalink
add utils
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoling-yi committed Oct 29, 2024
1 parent a1b9522 commit c282026
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
11 changes: 10 additions & 1 deletion target/sim/sw/device/apps/snax/snax-gemmx-conv/data/datagen.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,20 @@
import sys
import os

import subprocess

# Add data utility path
sys.path.append(os.path.join(os.path.dirname(__file__), "../../../../../../util/sim/"))
sys.path.append(os.path.join(os.path.dirname(__file__),
"../../../../../../../../util/sim/"))
from data_utils import format_scalar_definition, format_vector_definition # noqa E402

# Add golden model path
bender_command = subprocess.run(['bender', 'path', 'snitch_cluster'],
capture_output=True, text=True)
snax_utils_path = bender_command.stdout.strip()

sys.path.append(snax_utils_path + "/util/sim/")

from snax_utils import ( # noqa E402
conv2d,
im2col,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,19 @@
import sys
import os

import subprocess

# Add data utility path
sys.path.append(os.path.join(os.path.dirname(__file__), "../../../../../../util/sim/"))
sys.path.append(os.path.join(os.path.dirname(__file__),
"../../../../../../../../util/sim/"))
from data_utils import format_scalar_definition, format_vector_definition # noqa E402

# Add golden model path
bender_command = subprocess.run(['bender', 'path', 'snitch_cluster'],
capture_output=True, text=True)
snax_utils_path = bender_command.stdout.strip()

sys.path.append(snax_utils_path + "/util/sim/")
from snax_utils import ( # noqa E402
conv2d,
im2col,
Expand Down
3 changes: 2 additions & 1 deletion target/sim/sw/sim_elf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@

runs:
- elf: host/apps/offload/build/offload-snax-test-integration.elf
- elf: host/apps/offload/build/offload-snax-gemmx.elf
- elf: host/apps/offload/build/offload-snax-gemmx-matmul.elf
- elf: host/apps/offload/build/offload-snax-gemmx-conv.elf

0 comments on commit c282026

Please sign in to comment.