Skip to content

Commit

Permalink
Skip CheckPhysNetlist's DesignComparator for koios as out of memory
Browse files Browse the repository at this point in the history
Signed-off-by: Eddie Hung <[email protected]>
  • Loading branch information
eddieh-xlnx committed Jan 4, 2024
1 parent c1fa27c commit 13f4470
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/make.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ jobs:
- env:
REPORT_ROUTE_STATUS_URL: ${{ secrets.REPORT_ROUTE_STATUS_URL }}
REPORT_ROUTE_STATUS_AUTH: ${{ secrets.REPORT_ROUTE_STATUS_AUTH }}
# For certain benchmarks, wirelength_analyzer requires more memory than that available in GitHub Actions
# For certain benchmarks, wirelength_analyzer/CheckPhysNetlist requires more memory than that available in GitHub Actions
WIRELENGTH_ANALYZER_MOCK_RESULT: ${{ matrix.benchmark == 'koios_dla_like_large' }}
CHECK_PHYS_NETLIST_DIFF_MOCK_RESULT: ${{ matrix.benchmark == 'koios_dla_like_large' }}
RWROUTE_FORCE_LUT_PIN_SWAP: ${{ matrix.router == 'rwroute' && matrix.lutpinswap }}
run: |
make ROUTER="${{ matrix.router }}" BENCHMARKS="${{ matrix.benchmark }}" VERBOSE=1
Expand All @@ -94,9 +95,9 @@ jobs:
grep -H FAIL *.check
# Only expect report_route_status output if URL given
grep -H -e "# of nets with routing errors[. :]\+[1-9]" -e "# of unrouted nets[. :]\+[1-9]" *.check.log || ${{ secrets.REPORT_ROUTE_STATUS_URL == '' }}
# But CheckPhysNetlist must have no non-PIP differences
grep "INFO: No non-PIP differences found between routed and unrouted netlists" *.check.log
# Check no multiple sources, but expect stubs
# But CheckPhysNetlist must have no non-PIP differences (except koios because out-of-memory)
grep "INFO: No non-PIP differences found between routed and unrouted netlists" *.check.log || ${{ matrix.benchmark == 'koios_dla_like_large' }}
# Check no multiple sources, but expect stubs (except koios because out-of-memory)
grep "UserWarning: Found [0-9]\+ sources" *.wirelength && exit 1
grep "UserWarning: Found [0-9]\+ stubs" *.wirelength || ${{ matrix.benchmark == 'koios_dla_like_large' }}
# Allow wirelength computation to fail since nxroute may not have routed anything or wirelength_analyzer was not run
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ fpga-interchange-schema/interchange/capnp/java.capnp:

%_$(ROUTER).wirelength: %_$(ROUTER).phys | setup-wirelength_analyzer
if [[ "$(WIRELENGTH_ANALYZER_MOCK_RESULT)" == "true" ]]; then \
echo "::warning file=$@::wirelength_analyzer not run because WIRELENGTH_ANALYZER_MOCK_RESULT is set"; \
echo "::warning file=$<::wirelength_analyzer not run because WIRELENGTH_ANALYZER_MOCK_RESULT is set"; \
echo "Wirelength: inf" > $@; \
else \
python3 wirelength_analyzer/wa.py $< $(call log_and_or_display,$@); \
Expand Down
21 changes: 12 additions & 9 deletions src/com/xilinx/fpga24_routing_contest/CheckPhysNetlist.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,19 @@ public static void main(String[] args) throws IOException, InterruptedException

// Read the routed and unrouted Physical Netlists
Design routedDesign = PhysNetlistReader.readPhysNetlist(args[1]);
Design unroutedDesign = PhysNetlistReader.readPhysNetlist(args[2]);

DesignComparator dc = new DesignComparator();
dc.setComparePIPs(false);
int numDiffs = dc.compareDesigns(unroutedDesign, routedDesign);
unroutedDesign = null;
if (numDiffs == 0) {
System.out.println("INFO: No non-PIP differences found between routed and unrouted netlists");
if (System.getenv("CHECK_PHYS_NETLIST_DIFF_MOCK_RESULT").equals("true")) {
System.out.println("::warning file=" + args[1] + "::CheckPhysNetlist's DesignComparator not run because CHECK_PHYS_NETLIST_DIFF_MOCK_RESULT is set");
} else {
System.err.println("ERROR: Detected " + numDiffs + " non-PIP differences between " + args[1] + " and " + args[2]);
Design unroutedDesign = PhysNetlistReader.readPhysNetlist(args[2]);

DesignComparator dc = new DesignComparator();
dc.setComparePIPs(false);
int numDiffs = dc.compareDesigns(unroutedDesign, routedDesign);
if (numDiffs == 0) {
System.out.println("INFO: No non-PIP differences found between routed and unrouted netlists");
} else {
System.err.println("ERROR: Detected " + numDiffs + " non-PIP differences between " + args[1] + " and " + args[2]);
}
}

// Read the Logical Netlist
Expand Down

0 comments on commit 13f4470

Please sign in to comment.