Skip to content

Commit

Permalink
Update Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
eddieh-xlnx authored Jan 30, 2024
1 parent 852fad6 commit 31e9a63
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,20 @@ setup: compile-java setup-net_printer setup-wirelength_analyzer
# Also download/generate all device files necessary for the xcvu3p device
.PHONY: compile-java
compile-java:
ifneq ($(APPTAINER_NETWORK),none)
_JAVA_OPTIONS="$(JAVA_PROXY)" ./gradlew compileJava
_JAVA_OPTIONS="$(JAVA_PROXY)" RapidWright/bin/rapidwright Jython -c "FileTools.ensureDataFilesAreStaticInstallFriendly('xcvu3p')"
else
# $@ target skipped
endif

.PHONY: install-python-deps
install-python-deps:
ifneq ($(APPTAINER_NETWORK),none)
pip install -q -r requirements.txt --pre --user
else
# $@ target skipped
endif

# Download and unpack all benchmarks
.PHONY: download-benchmarks
Expand Down Expand Up @@ -184,18 +192,18 @@ workdir:
rm -rf workdir && mkdir workdir

.PHONY: setup-container
setup-container: $(ROUTER)_container.sif workdir
setup-container: $(ROUTER)_container.sif | workdir
apptainer exec $(APPTAINER_RUN_ARGS) $< make setup

# Use the <ROUTER>_container.sif Apptainer image to run all benchmarks
.PHONY: run-container
run-container: $(ROUTER)_container.sif setup-container
apptainer exec --network none $(APPTAINER_RUN_ARGS) $< make ROUTER="$(ROUTER)" BENCHMARKS="$(BENCHMARKS)" VERBOSE="$(VERBOSE)"
run-container: $(ROUTER)_container.sif | setup-container
apptainer exec --network none --env APPTAINER_NETWORK=none $(APPTAINER_RUN_ARGS) $< make ROUTER="$(ROUTER)" BENCHMARKS="$(BENCHMARKS)" VERBOSE="$(VERBOSE)"

# Use the <ROUTER>_container.sif Apptainer image to run a single small benchmark for testing
.PHONY: test-container
test-container: $(ROUTER)_container.sif setup-container
apptainer exec --network none $(APPTAINER_RUN_ARGS) $< make ROUTER="$(ROUTER)" BENCHMARKS="boom_med_pb" VERBOSE="$(VERBOSE)"
test-container: $(ROUTER)_container.sif | setup-container
apptainer exec --network none --env APPTAINER_NETWORK=none $(APPTAINER_RUN_ARGS) $< make ROUTER="$(ROUTER)" BENCHMARKS="boom_med_pb" VERBOSE="$(VERBOSE)"

SUBMISSION_NAME = $(ROUTER)_submission_$(shell date +%Y%m%d%H%M%S)

Expand All @@ -215,8 +223,8 @@ opencl_example_container.sif: final_submission/opencl_example/opencl_example_con
apptainer build $@ $<

.PHONY: run-opencl-example
run-opencl-example: opencl_example_container.sif workdir
apptainer run --network none $(APPTAINER_RUN_ARGS) $<
run-opencl-example: opencl_example_container.sif | workdir
apptainer run --network none --env APPTAINER_NETWORK=none $(APPTAINER_RUN_ARGS) $<

#### END EXAMPLE RECIPES

Expand Down

0 comments on commit 31e9a63

Please sign in to comment.