Skip to content

Commit 0ece2d2

Browse files
authored
Merge pull request #483 from SymbiFlow/master+wip-placement3
New master+wip
2 parents 82b720d + f5c8a7b commit 0ece2d2

28 files changed

+710
-80
lines changed

.github/kokoro/continuous/nightly.cfg

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,25 @@ env_vars {
3535
value: "vtr-verilog-to-routing"
3636
}
3737

38+
#Use default build configuration
39+
env_vars {
40+
key: "VTR_CMAKE_PARAMS"
41+
value: ""
42+
}
43+
3844
env_vars {
3945
key: "VTR_TEST"
4046
value: "vtr_reg_nightly"
4147
}
4248

49+
#Options for run_reg_test.pl
50+
# -show_failures: show tool failures in main log output
51+
env_vars {
52+
key: "VTR_TEST_OPTIONS"
53+
value: "-show_failures"
54+
}
55+
4356
env_vars {
4457
key: "NUM_CORES"
45-
value: "6"
58+
value: "5"
4659
}

.github/kokoro/continuous/strong.cfg

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,24 @@ env_vars {
3535
value: "vtr-verilog-to-routing"
3636
}
3737

38+
#Enable extra assertion checking for strong test
39+
env_vars {
40+
key: "VTR_CMAKE_PARAMS"
41+
value: "-DVTR_ASSERT_LEVEL=3"
42+
}
43+
3844
env_vars {
3945
key: "VTR_TEST"
4046
value: "vtr_reg_strong"
4147
}
4248

49+
#Options for run_reg_test.pl
50+
# -show_failures: show tool failures in main log output
51+
env_vars {
52+
key: "VTR_TEST_OPTIONS"
53+
value: "-show_failures"
54+
}
55+
4356
env_vars {
4457
key: "NUM_CORES"
4558
value: "8"
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
build_file: "vtr-verilog-to-routing/.github/kokoro/run-vtr.sh"
4+
5+
# 1 hour
6+
timeout_mins: 60
7+
8+
action {
9+
define_artifacts {
10+
# File types
11+
regex: "**/*.out"
12+
regex: "**/vpr_stdout.log"
13+
regex: "**/parse_results.txt"
14+
regex: "**/qor_results.txt"
15+
regex: "**/pack.log"
16+
regex: "**/place.log"
17+
regex: "**/route.log"
18+
regex: "**/*_qor.csv"
19+
strip_prefix: "github/vtr-verilog-to-routing/"
20+
}
21+
}
22+
23+
env_vars {
24+
key: "KOKORO_TYPE"
25+
value: "continuous"
26+
}
27+
28+
env_vars {
29+
key: "KOKORO_DIR"
30+
value: "vtr-verilog-to-routing"
31+
}
32+
33+
env_vars {
34+
key: "VTR_DIR"
35+
value: "vtr-verilog-to-routing"
36+
}
37+
38+
#VTR build configuration options:
39+
# -DVTR_ASSERT_LEVEL=3: Enable extra assertion checking
40+
# -DVTR_ENABLE_SANITIZE=ON: Enable compiler sanitizers (check for memory issues, undefined behaviour, etc.)
41+
env_vars {
42+
key: "VTR_CMAKE_PARAMS"
43+
value: "-DVTR_ASSERT_LEVEL=3 -DVTR_ENABLE_SANITIZE=ON"
44+
}
45+
46+
env_vars {
47+
key: "VTR_TEST"
48+
value: "vtr_reg_strong"
49+
}
50+
51+
#Options for run_reg_test.pl
52+
# -show_failures: show tool failures in main log output
53+
# -skip_qor: Skip QoR checks (since we expect run-time failures due to sanitizers)
54+
env_vars {
55+
key: "VTR_TEST_OPTIONS"
56+
value: "-show_failures -skip_qor"
57+
}
58+
59+
env_vars {
60+
key: "NUM_CORES"
61+
value: "8"
62+
}

.github/kokoro/continuous/weekly.cfg

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,24 @@ env_vars {
3535
value: "vtr-verilog-to-routing"
3636
}
3737

38+
#Use default build configuration
39+
env_vars {
40+
key: "VTR_CMAKE_PARAMS"
41+
value: ""
42+
}
43+
3844
env_vars {
3945
key: "VTR_TEST"
4046
value: "vtr_reg_weekly"
4147
}
4248

49+
#Options for run_reg_test.pl
50+
# -show_failures: show tool failures in main log output
51+
env_vars {
52+
key: "VTR_TEST_OPTIONS"
53+
value: "-show_failures"
54+
}
55+
4356
env_vars {
4457
key: "NUM_CORES"
4558
value: "3"

.github/kokoro/presubmit/nightly.cfg

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,25 @@ env_vars {
3535
value: "vtr-verilog-to-routing"
3636
}
3737

38+
#Use default build configuration
39+
env_vars {
40+
key: "VTR_CMAKE_PARAMS"
41+
value: ""
42+
}
43+
3844
env_vars {
3945
key: "VTR_TEST"
4046
value: "vtr_reg_nightly"
4147
}
4248

49+
#Options for run_reg_test.pl
50+
# -show_failures: show tool failures in main log output
51+
env_vars {
52+
key: "VTR_TEST_OPTIONS"
53+
value: "-show_failures"
54+
}
55+
4356
env_vars {
4457
key: "NUM_CORES"
45-
value: "6"
58+
value: "5"
4659
}

.github/kokoro/presubmit/strong.cfg

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,24 @@ env_vars {
3535
value: "vtr-verilog-to-routing"
3636
}
3737

38+
#Enable extra assertion checking for strong test
39+
env_vars {
40+
key: "VTR_CMAKE_PARAMS"
41+
value: "-DVTR_ASSERT_LEVEL=3"
42+
}
43+
3844
env_vars {
3945
key: "VTR_TEST"
4046
value: "vtr_reg_strong"
4147
}
4248

49+
#Options for run_reg_test.pl
50+
# -show_failures: show tool failures in main log output
51+
env_vars {
52+
key: "VTR_TEST_OPTIONS"
53+
value: "-show_failures"
54+
}
55+
4356
env_vars {
4457
key: "NUM_CORES"
4558
value: "8"
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
build_file: "vtr-verilog-to-routing/.github/kokoro/run-vtr.sh"
4+
5+
# 1 hour
6+
timeout_mins: 60
7+
8+
action {
9+
define_artifacts {
10+
# File types
11+
regex: "**/*.out"
12+
regex: "**/vpr_stdout.log"
13+
regex: "**/parse_results.txt"
14+
regex: "**/qor_results.txt"
15+
regex: "**/pack.log"
16+
regex: "**/place.log"
17+
regex: "**/route.log"
18+
regex: "**/*_qor.csv"
19+
strip_prefix: "github/vtr-verilog-to-routing/"
20+
}
21+
}
22+
23+
env_vars {
24+
key: "KOKORO_TYPE"
25+
value: "presubmit"
26+
}
27+
28+
env_vars {
29+
key: "KOKORO_DIR"
30+
value: "vtr-verilog-to-routing"
31+
}
32+
33+
env_vars {
34+
key: "VTR_DIR"
35+
value: "vtr-verilog-to-routing"
36+
}
37+
38+
#VTR build configuration options:
39+
# -DVTR_ASSERT_LEVEL=3: Enable extra assertion checking
40+
# -DVTR_ENABLE_SANITIZE=ON: Enable compiler sanitizers (check for memory issues, undefined behaviour, etc.)
41+
env_vars {
42+
key: "VTR_CMAKE_PARAMS"
43+
value: "-DVTR_ASSERT_LEVEL=3 -DVTR_ENABLE_SANITIZE=ON"
44+
}
45+
46+
env_vars {
47+
key: "VTR_TEST"
48+
value: "vtr_reg_strong"
49+
}
50+
51+
#Options for run_reg_test.pl
52+
# -show_failures: show tool failures in main log output
53+
# -skip_qor: Skip QoR checks (since we expect run-time failures due to sanitizers)
54+
env_vars {
55+
key: "VTR_TEST_OPTIONS"
56+
value: "-show_failures -skip_qor"
57+
}
58+
59+
env_vars {
60+
key: "NUM_CORES"
61+
value: "8"
62+
}

.github/kokoro/steps/hostinfo.sh

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,30 @@ echo
1313
echo "========================================"
1414
echo "Host CPU"
1515
echo "----------------------------------------"
16-
export CORES=$(nproc --all)
17-
echo "Cores: $CORES"
16+
17+
export LOGICAL_CORES=$(nproc --all)
18+
echo "Logical Cores (counting SMT/HT): $LOGICAL_CORES"
19+
20+
#The 2nd column of lscpu -p contains the core ID, with each physical
21+
# core having 1 or (in the case of SMT/hyperthreading) more logical
22+
# CPUs. Counting the *unique* core IDs across lines tells us the number
23+
# of *physical* CPUs (cores).
24+
export PHYSICAL_CORES=$(lscpu -p | egrep -v '^#' | sort -u -t, -k 2,4 | wc -l)
25+
echo "Physical Cores (ignoring SMT/HT): $PHYSICAL_CORES"
26+
27+
export MEM_GB=$(($(awk '/MemTotal/ {print $2}' /proc/meminfo)/(1024*1024)))
28+
echo "Memory (GB): $MEM_GB"
29+
30+
echo
31+
echo "CPU Details"
32+
echo "----------------------------------------"
33+
lscpu
34+
echo "----------------------------------------"
1835
echo
1936
echo "Memory"
2037
echo "----------------------------------------"
2138
cat /proc/meminfo
2239
echo "----------------------------------------"
23-
export MEM_GB=$(($(awk '/MemTotal/ {print $2}' /proc/meminfo)/(1024*1024)))
24-
echo "Memory (GB): $CORES"
25-
export MEM_CORES=$(($MEM_GB/4))
26-
echo "Cores (4 GB per): $MEM_CORES"
27-
export MAX_CORES_NO_MIN=$(($MEM_CORES>$CORES?$CORES:$MEM_CORES))
28-
export MAX_CORES=$(($MAX_CORES_NO_MIN<1?1:$MAX_CORES_NO_MIN))
29-
echo "Max cores: $MAX_CORES"
3040
echo "----------------------------------------"
3141
echo "Process limits:"
3242
echo "----------------------------------------"

.github/kokoro/steps/vtr-build.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
#!/bin/bash
22

3+
if [ -z ${VTR_CMAKE_PARAMS+x} ]; then
4+
echo "Missing $$VTR_CMAKE_PARAMS value"
5+
exit 1
6+
fi
7+
8+
if [ -z $LOGICAL_CORES ]; then
9+
echo "Missing $$LOGICAL_CORES value"
10+
exit 1
11+
fi
12+
313
export FAILURE=0
4-
make -k CMAKE_PARAMS="-DVTR_ASSERT_LEVEL=3" -j$MAX_CORES || export FAILURE=1
14+
make -k CMAKE_PARAMS="$VTR_CMAKE_PARAMS" -j$LOGICAL_CORES || export FAILURE=1
515

616
echo
717
echo
@@ -10,6 +20,6 @@ echo
1020

1121
# When the build fails, produce the failure output in a clear way
1222
if [ $FAILURE -ne 0 ]; then
13-
make CMAKE_PARAMS="-DVTR_ASSERT_LEVEL=3" -j1
23+
make CMAKE_PARAMS="$VTR_CMAKE_PARAMS" -j1
1424
exit 1
1525
fi

.github/kokoro/steps/vtr-test.sh

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#!/bin/bash
22

3-
if [ -z $VTR_TEST ]; then
3+
if [ -z ${VTR_TEST+x} ]; then
44
echo "Missing $$VTR_TEST value"
55
exit 1
66
fi
77

8-
if [ -z $MAX_CORES ]; then
9-
echo "Missing $$MAX_CORES value"
8+
if [ -z ${VTR_TEST_OPTIONS+x} ]; then
9+
echo "Missing $$VTR_TEST_OPTIONS value"
1010
exit 1
1111
fi
1212

@@ -36,6 +36,14 @@ pwd -P
3636
) &
3737
MONITOR=$!
3838

39+
echo "========================================"
40+
echo "VPR Build Info"
41+
echo "========================================"
42+
./vpr/vpr --version
43+
44+
echo "========================================"
45+
echo "Running Tests"
46+
echo "========================================"
3947
export VPR_NUM_WORKERS=1
40-
./run_reg_test.pl $VTR_TEST -show_failures -j$NUM_CORES
48+
./run_reg_test.pl $VTR_TEST $VTR_TEST_OPTIONS -j$NUM_CORES
4149
kill $MONITOR

0 commit comments

Comments
 (0)