-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Makefile] Track user-cpu time (not used for scoring) (#78)
* [Makefile] Also print out user-cpu time * Update Makefile * Update Makefile Signed-off-by: Eddie Hung <[email protected]> * User-CPU time only if not rwroute Signed-off-by: Eddie Hung <[email protected]> * Call java directly Signed-off-by: Eddie Hung <[email protected]> * Use target-specific export instead Signed-off-by: Eddie Hung <[email protected]> * Revert "Use target-specific export instead" This reverts commit a03d85a. * Try := Signed-off-by: Eddie Hung <[email protected]> * Double dollar Signed-off-by: Eddie Hung <[email protected]> * Compute inside subshell not Makefile Signed-off-by: Eddie Hung <[email protected]> * Wall clock time to be second-to-last line now Signed-off-by: Eddie Hung <[email protected]> * Use an intermediate java classpath file Signed-off-by: Eddie Hung <[email protected]> * Filter word list Signed-off-by: Eddie Hung <[email protected]> * Improve workflow tests Signed-off-by: Eddie Hung <[email protected]> * Make java-classpath.txt an order-only dep Signed-off-by: Eddie Hung <[email protected]> * Fix workflow Signed-off-by: Eddie Hung <[email protected]> --------- Signed-off-by: Eddie Hung <[email protected]>
- Loading branch information
1 parent
fd0fa4e
commit 6ecca48
Showing
4 changed files
with
26 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,8 +37,11 @@ $(if $(HTTPSHOST),-Dhttps.proxyHost=$(HTTPSHOST) -Dhttps.proxyPort=$(HTTPSPORT), | |
# (other supported values: nxroute-poc) | ||
ROUTER ?= rwroute | ||
|
||
# Make /usr/bin/time only print out wall-clock time in seconds | ||
export TIME=Wall-clock time (sec): %e | ||
# Make /usr/bin/time only print out wall-clock and user time in seconds | ||
TIME = Wall-clock time (sec): %e | ||
# Note that User-CPU time is for information purposes only (not used for scoring) | ||
TIME += \nUser-CPU time (sec): %U | ||
export TIME | ||
|
||
# Existence of the VERBOSE environment variable indicates whether router/ | ||
# checker outputs will be displayed on screen | ||
|
@@ -63,6 +66,11 @@ export RAPIDWRIGHT_PATH = $(abspath RapidWright) | |
.PHONY: run-$(ROUTER) | ||
run-$(ROUTER): score-$(ROUTER) | ||
|
||
JAVA_CLASSPATH_TXT = java-classpath.txt | ||
.INTERMEDIATE: $(JAVA_CLASSPATH_TXT) | ||
$(JAVA_CLASSPATH_TXT): compile-java | ||
echo "$$(./gradlew -quiet --offline runtimeClasspath):build/classes/java/main" > $@ | ||
|
||
# Use Gradle to compile Java source code in this repository as well as the RapidWright repository. | ||
# Also download/generate all device files necessary for the xcvu3p device | ||
.PHONY: compile-java | ||
|
@@ -92,8 +100,8 @@ fpga-interchange-schema/interchange/capnp/java.capnp: | |
# Gradle is used to invoke the CheckPhysNetlist class' main method with arguments | ||
# $^ (%.netlist and %_rwroute.phys), and display/redirect all output to [email protected] (%_rwroute.check.log). | ||
# The exit code of Gradle determines if 'PASS' or 'FAIL' is written to $@ (%_rwroute.check) | ||
%_$(ROUTER).check: %.netlist %_$(ROUTER).phys %_unrouted.phys | compile-java | ||
if ./gradlew --offline -DjvmArgs="$(JVM_HEAP)" -Dmain=com.xilinx.fpga24_routing_contest.CheckPhysNetlist :run --args='$^' $(call log_and_or_display,$@.log); then \ | ||
%_$(ROUTER).check: %.netlist %_$(ROUTER).phys %_unrouted.phys | $(JAVA_CLASSPATH_TXT) | ||
if java -cp $$(cat $(JAVA_CLASSPATH_TXT)) $(JVM_HEAP) com.xilinx.fpga24_routing_contest.CheckPhysNetlist $^ $(call log_and_or_display,$@.log); then \ | ||
echo "PASS" > $@; \ | ||
else \ | ||
echo "FAIL" > $@; \ | ||
|
@@ -135,8 +143,9 @@ distclean: clean | |
# /usr/bin/time is used to measure the wall clock time | ||
# Gradle is used to invoke the PartialRouterPhysNetlist class' main method with arguments | ||
# $< (%_unrouted.phys) and $@ (%_rwroute.phys), and display/redirect all output into %_rwroute.phys.log | ||
%_rwroute.phys: %_unrouted.phys | compile-java | ||
(/usr/bin/time ./gradlew --offline -DjvmArgs="$(JVM_HEAP)" -Dmain=com.xilinx.fpga24_routing_contest.PartialRouterPhysNetlist :run --args='$< $@') $(call log_and_or_display,$@.log) | ||
%_rwroute.phys: %_unrouted.phys | $(JAVA_CLASSPATH_TXT) | ||
(/usr/bin/time java -cp $$(cat $(JAVA_CLASSPATH_TXT)) $(JVM_HEAP) com.xilinx.fpga24_routing_contest.PartialRouterPhysNetlist $< $@) $(call log_and_or_display,$@.log) | ||
|
||
|
||
## NXROUTE-POC | ||
%_nxroute-poc.phys: %_unrouted.phys xcvu3p.device | install-python-deps fpga-interchange-schema/interchange/capnp/java.capnp | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters