Skip to content

Commit

Permalink
Merge pull request #43 from ReconfigureIO/feature/do-builds-on-test
Browse files Browse the repository at this point in the history
Do builds on test if we are in a certain branch.
  • Loading branch information
bohde authored Feb 15, 2017
2 parents 5261a2f + c359ec5 commit 76ab73f
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 23 deletions.
49 changes: 34 additions & 15 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,26 +60,45 @@ pipeline {

stage('test simulation') {
steps {
parallel noop: {
dir('examples/noop'){
sh '../../reco-jarvice/reco-jarvice test test-noop'
}
},
addition: {
dir('examples/addition'){
sh '../../reco-jarvice/reco-jarvice test test-addition'
}
},
histogram: {
parallel histogram: {
dir('examples/histogram'){
sh '../../reco-jarvice/reco-jarvice test test-histogram'
}
},
memcopy: {
dir('examples/memcopy'){
sh '../../reco-jarvice/reco-jarvice test test-memcopy'
}
// addition: {
// dir('examples/addition'){
// sh '../../reco-jarvice/reco-jarvice test test-addition'
// }
// }
// memcopy: {
// dir('examples/memcopy'){
// sh '../../reco-jarvice/reco-jarvice test test-memcopy'
// }
// }
}
}


stage('test hw builds') {
when {
expression { env.BRANCH_NAME == "PR-43" }
}
steps {
parallel histogram: {
dir('examples/histogram'){
sh 'NUMBER=$(../../reco-jarvice/reco-jarvice build) && ../../reco-jarvice/reco-jarvice run $NUMBER test-histogram'
}
}
// addition: {
// dir('examples/addition'){
// sh 'NUMBER=$(../../reco-jarvice/reco-jarvice build) && ../../reco-jarvice/reco-jarvice run $NUMBER test-addition'
// }
// }
// memcopy: {
// dir('examples/memcopy'){
// sh 'NUMBER=$(../../reco-jarvice/reco-jarvice build) && ../../reco-jarvice/reco-jarvice run $NUMBER test-memcopy'
// }
// }
}
}

Expand Down
6 changes: 6 additions & 0 deletions examples/histogram/cmd/test-histogram/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"bytes"
"encoding/binary"
"fmt"
"log"
"reflect"
"xcl"
Expand Down Expand Up @@ -54,4 +55,9 @@ func main() {
if !reflect.DeepEqual(expected, ret) {
log.Fatalf("%v != %v\n", ret, expected)
}

for i, val := range ret {
fmt.Printf("%d: %d\n", i<<(32-9), val)
}

}
6 changes: 5 additions & 1 deletion examples/memcopy/cmd/test-memcopy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ func main() {
log.Fatal("binary.Read failed:", err)
}

return reflect.DeepEqual(ret, input)
if !reflect.DeepEqual(ret, input) {
log.Printf("%v != %v", ret, input)
return false
}
return true
}

if err := quick.Check(memcpy, &conf); err != nil {
Expand Down
12 changes: 8 additions & 4 deletions go-teak/src/sdaccel/memory/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,10 @@ func Write(

go func() {
memoryWriteAddr <- Addr{
Addr: address,
Size: [3]bool{false, true, false},
Addr: address,
Size: [3]bool{false, true, false},
Cache: [4]bool{false, false, true, true},
Burst: [2]bool{false, true},
}
}()

Expand All @@ -120,8 +122,10 @@ func Read(

go func() {
memoryReadAddr <- Addr{
Addr: address,
Size: [3]bool{false, true, false},
Addr: address,
Size: [3]bool{false, true, false},
Cache: [4]bool{false, false, true, true},
Burst: [2]bool{false, true},
}
}()

Expand Down
3 changes: 2 additions & 1 deletion go-teak/src/sdaccel/scripts/sda_kernel_packaging.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ puts $fileId " workGroupSize=\"1\">"
puts $fileId " <ports>"
puts $fileId " <port name=\"m_axi_gmem\""
puts $fileId " mode=\"master\""
puts $fileId " range=\"0x100000000\""
puts $fileId " range=\"0xFFFFFFFF\""
puts $fileId " dataWidth=\"32\""
puts $fileId " portType=\"addressable\""
puts $fileId " base=\"0x0\"/>"
Expand All @@ -57,6 +57,7 @@ if {0 != [file exists $argsFileName]} {
close $argsFileId
}
puts $fileId " </args>"
puts $fileId " <compileWorkGroupSize x=\"1\" y=\"1\" z=\"1\"/>"
puts $fileId "</kernel>"
puts $fileId "</root>"
close $fileId
Expand Down
1 change: 1 addition & 0 deletions reco-jarvice/batch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
},
"application": {
"geometry": "1584x690",
"walltime": "2:00:00",
"staging": false,
"command": "gui",
"parameters": {
Expand Down
1 change: 1 addition & 0 deletions reco-jarvice/deploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"geometry": "2542x1228",
"staging": false,
"command": "batch",
"walltime": "2:00:00",
"parameters": {
"executable": "/job/e5d15fcc-d829-11e6-bca2-843a4b0da254/hello",
"args": "",
Expand Down
2 changes: 1 addition & 1 deletion reco-jarvice/reco-jarvice
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ function wait_for {
NUMBER="$1"
jarvice_cli wait_for -number "$NUMBER" > /dev/null
STATUS=$(jarvice_cli status -number "$NUMBER" | jq -r ".[\"$NUMBER\"].job_status")
jarvice_cli output -number "$NUMBER" -lines 0
jarvice_cli output -number "$NUMBER" -lines 0 1>&2
if [ "$STATUS" == "COMPLETED WITH ERROR" ]
then
exit 1;
Expand Down
2 changes: 1 addition & 1 deletion sdaccel-builder.mk
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ${XCLBIN_DIR}:
mkdir -p "${XCLBIN_DIR}"

${XCLBIN_DIR}/${KERNEL_NAME}.${TARGET}.${DEVICE}.xclbin: ${BUILD_DIR}/${XO_NAME} ${XCLBIN_DIR}
xocc -j8 -O3 -t "${TARGET}" --xdevice ${DEVICE_FULL} -l $< -o $@
xocc -j8 -O3 -t "${TARGET}" --xdevice ${DEVICE_FULL} -l $< -o $@ -r estimate

${DIST_DIR}/emconfig.json: ${DIST_DIR}
cd ${DIST_DIR} && XCL_EMULATION_MODE=${TARGET} emconfigutil --xdevice ${DEVICE_FULL} --nd 1
Expand Down

0 comments on commit 76ab73f

Please sign in to comment.