Skip to content

Commit 68283d2

Browse files
author
Viviane Potocnik
committed
treewide: remove global Python declaration and use venv
1 parent 77848bc commit 68283d2

File tree

5 files changed

+14
-15
lines changed

5 files changed

+14
-15
lines changed

iis-setup.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
# SPDX-License-Identifier: Apache-2.0
55

66
# Define environment variables
7-
export PYTHON=/usr/local/anaconda3-2022.05/bin/python3
87
export BENDER=bender-0.27.1
98
export CC=gcc-9.2.0
109
export CXX=g++-9.2.0
@@ -14,7 +13,7 @@ export QUESTA_SEPP=questa-2022.3
1413
export LLVM_BINROOT=/usr/pack/riscv-1.0-kgf/pulp-llvm-0.12.0/bin
1514

1615
# Create Python virtual environment with required packages
17-
$PYTHON -m venv .venv
16+
/usr/local/anaconda3-2022.05/bin/python3 -m venv .venv
1817
source .venv/bin/activate
1918
# Unpack packages in a local temporary directory which can be safely cleaned
2019
# after installation. Also protects against "No space left on device" errors

target/common/common.mk

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -228,24 +228,24 @@ event-csv: $(EVENT_CSV)
228228
layout: $(TRACE_CSV) $(TRACE_JSON)
229229

230230
$(LOGS_DIR)/trace_hart_%.txt $(LOGS_DIR)/hart_%_perf.json: $(LOGS_DIR)/trace_hart_%.dasm $(GENTRACE_PY)
231-
$(DASM) < $< | $(PYTHON) $(GENTRACE_PY) --permissive -d $(LOGS_DIR)/hart_$*_perf.json > $(LOGS_DIR)/trace_hart_$*.txt
231+
$(DASM) < $< | $(GENTRACE_PY) --permissive -d $(LOGS_DIR)/hart_$*_perf.json > $(LOGS_DIR)/trace_hart_$*.txt
232232

233233
# Generate source-code interleaved traces for all harts. Reads the binary from
234234
# the logs/.rtlbinary file that is written at start of simulation in the vsim script
235235
BINARY ?= $(shell cat $(SIM_DIR)/.rtlbinary)
236236
$(LOGS_DIR)/trace_hart_%.s: $(LOGS_DIR)/trace_hart_%.txt ${ANNOTATE_PY}
237-
$(PYTHON) ${ANNOTATE_PY} ${ANNOTATE_FLAGS} -o $@ $(BINARY) $<
237+
${ANNOTATE_PY} ${ANNOTATE_FLAGS} -o $@ $(BINARY) $<
238238
$(LOGS_DIR)/trace_hart_%.diff: $(LOGS_DIR)/trace_hart_%.txt ${ANNOTATE_PY}
239-
$(PYTHON) ${ANNOTATE_PY} ${ANNOTATE_FLAGS} -o $@ $(BINARY) $< -d
239+
${ANNOTATE_PY} ${ANNOTATE_FLAGS} -o $@ $(BINARY) $< -d
240240

241241
$(PERF_CSV): $(PERF_TRACES) $(PERF_CSV_PY)
242-
$(PYTHON) $(PERF_CSV_PY) -o $@ -i $(PERF_TRACES)
242+
$(PERF_CSV_PY) -o $@ -i $(PERF_TRACES)
243243

244244
$(EVENT_CSV): $(PERF_TRACES) $(PERF_CSV_PY)
245-
$(PYTHON) $(PERF_CSV_PY) -o $@ -i $(PERF_TRACES) --filter tstart tend
245+
$(PERF_CSV_PY) -o $@ -i $(PERF_TRACES) --filter tstart tend
246246

247247
$(TRACE_CSV): $(EVENT_CSV) $(LAYOUT_FILE) $(LAYOUT_EVENTS_PY)
248-
$(PYTHON) $(LAYOUT_EVENTS_PY) $(LAYOUT_EVENTS_FLAGS) $(EVENT_CSV) $(LAYOUT_FILE) -o $@
248+
$(LAYOUT_EVENTS_PY) $(LAYOUT_EVENTS_FLAGS) $(EVENT_CSV) $(LAYOUT_FILE) -o $@
249249

250250
$(TRACE_JSON): $(TRACE_CSV) $(EVENTVIS_PY)
251-
$(PYTHON) $(EVENTVIS_PY) -o $@ $(TRACE_CSV)
251+
$(EVENTVIS_PY) -o $@ $(TRACE_CSV)

target/snitch_cluster/sw/apps/blas/gemm/test/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ TEST_LIST=$(pwd)/run.yaml
1313
CFG_FILES=$(pwd)/cfg/"*"
1414
CMD="$ROOT/sw/blas/gemm/scripts/verify.py \${sim_bin} \${elf} --dump-results"
1515

16-
$PYTHON $BUILD_PY sw/apps/blas/gemm --cfg $CFG_FILES --testlist $TEST_LIST --testlist-cmd "$CMD"
17-
$PYTHON $RUN_PY $TEST_LIST --simulator vsim -j
16+
$BUILD_PY sw/apps/blas/gemm --cfg $CFG_FILES --testlist $TEST_LIST --testlist-cmd "$CMD"
17+
$RUN_PY $TEST_LIST --simulator vsim -j

target/snitch_cluster/sw/apps/dnn/flashattention_2/test/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ TEST_LIST=$(pwd)/run.yaml
1212
CFG_FILES=$(pwd)/cfg/"*"
1313
CMD="$ROOT/sw/dnn/flashattention_2/scripts/verify.py \${sim_bin} \${elf} --dump-results"
1414

15-
$PYTHON $BUILD_PY sw/apps/dnn/flashattention_2 --cfg $CFG_FILES --testlist $TEST_LIST --testlist-cmd "$CMD"
16-
$PYTHON $RUN_PY $TEST_LIST --simulator vsim -j
15+
$BUILD_PY sw/apps/dnn/flashattention_2 --cfg $CFG_FILES --testlist $TEST_LIST --testlist-cmd "$CMD"
16+
$RUN_PY $TEST_LIST --simulator vsim -j

target/snitch_cluster/sw/apps/dnn/transpose/test/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ TEST_LIST=$(pwd)/run.yaml
1212
CFG_FILES=$(pwd)/cfg/"*"
1313
CMD="$ROOT/sw/dnn/transpose/scripts/verify.py \${sim_bin} \${elf} --dump-results"
1414

15-
$PYTHON $BUILD_PY sw/apps/dnn/transpose --cfg $CFG_FILES --testlist $TEST_LIST --testlist-cmd "$CMD"
16-
$PYTHON $RUN_PY $TEST_LIST --simulator vsim -j
15+
$BUILD_PY sw/apps/dnn/transpose --cfg $CFG_FILES --testlist $TEST_LIST --testlist-cmd "$CMD"
16+
$RUN_PY $TEST_LIST --simulator vsim -j

0 commit comments

Comments
 (0)