Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Commit 6161e84

Browse files
committed
Julia: add windows-cpu build
- Julia v0.7 - Julia v1.0
1 parent e8a2b8b commit 6161e84

File tree

13 files changed

+185
-78
lines changed

13 files changed

+185
-78
lines changed

ci/docker/runtime_functions.sh

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -912,29 +912,21 @@ unittest_ubuntu_cpu_julia() {
912912
export PATH="$1/bin:$PATH"
913913
export MXNET_HOME='/work/mxnet'
914914
export JULIA_DEPOT_PATH='/work/julia-depot'
915-
export DEVDIR="$JULIA_DEPOT_PATH/dev"
916915

917916
julia -e 'using InteractiveUtils; versioninfo()'
918917

919-
# install package
920-
mkdir -p $DEVDIR
921-
ln -sf ${MXNET_HOME}/julia ${DEVDIR}/MXNet
922-
923-
# register MXNet.jl and dependencies
924-
julia -e 'using Pkg; Pkg.develop("MXNet")'
925-
926918
# FIXME
927919
export LD_PRELOAD='/usr/lib/x86_64-linux-gnu/libjemalloc.so'
928920
export LD_LIBRARY_PATH=/work/mxnet/lib:$LD_LIBRARY_PATH
929921

930922
# use the prebuilt binary from $MXNET_HOME/lib
931-
julia -e 'using Pkg; Pkg.build("MXNet")'
923+
julia --project=./julia -e 'using Pkg; Pkg.build("MXNet")'
932924

933925
# run the script `julia/test/runtests.jl`
934-
julia -e 'using Pkg; Pkg.test("MXNet")'
926+
julia --project=./julia -e 'using Pkg; Pkg.test("MXNet")'
935927

936928
# See https://github.com/dmlc/MXNet.jl/pull/303#issuecomment-341171774
937-
julia -e 'using MXNet; mx._sig_checker()'
929+
julia --project=./julia -e 'using MXNet; mx._sig_checker()'
938930
}
939931

940932
unittest_ubuntu_cpu_julia07() {
@@ -1270,10 +1262,8 @@ deploy_jl_docs() {
12701262
export PATH="/work/julia10/bin:$PATH"
12711263
export MXNET_HOME='/work/mxnet'
12721264
export JULIA_DEPOT_PATH='/work/julia-depot'
1273-
export DEVDIR="$JULIA_DEPOT_PATH/dev"
12741265

12751266
julia -e 'using InteractiveUtils; versioninfo()'
1276-
mkdir -p $DEVDIR
12771267

12781268
# FIXME
12791269
export LD_PRELOAD='/usr/lib/x86_64-linux-gnu/libjemalloc.so'

ci/jenkins/Jenkins_steps.groovy

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,6 +1169,34 @@ def test_windows_python3_cpu() {
11691169
}]
11701170
}
11711171

1172+
def test_windows_julia07_cpu() {
1173+
return ['Julia 0.7: CPU Win': {
1174+
node(NODE_WINDOWS_CPU) {
1175+
ws('workspace/ut-julia07-cpu') {
1176+
timeout(time: max_time, unit: 'MINUTES') {
1177+
utils.init_git_win()
1178+
unstash 'windows_package_cpu'
1179+
powershell 'ci/windows/test_jl07_cpu.ps1'
1180+
}
1181+
}
1182+
}
1183+
}]
1184+
}
1185+
1186+
def test_windows_julia10_cpu() {
1187+
return ['Julia 1.0: CPU Win': {
1188+
node(NODE_WINDOWS_CPU) {
1189+
ws('workspace/ut-julia10-cpu') {
1190+
timeout(time: max_time, unit: 'MINUTES') {
1191+
utils.init_git_win()
1192+
unstash 'windows_package_cpu'
1193+
powershell 'ci/windows/test_jl10_cpu.ps1'
1194+
}
1195+
}
1196+
}
1197+
}]
1198+
}
1199+
11721200
def test_qemu_armv7_cpu() {
11731201
return ['ARMv7 QEMU': {
11741202
node(NODE_LINUX_CPU) {

ci/jenkins/Jenkinsfile_windows_cpu

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,14 @@ utils.main_wrapper(
3535
core_logic: {
3636
utils.parallel_stage('Build', [
3737
custom_steps.compile_windows_cpu()
38-
])
38+
])
3939

4040
utils.parallel_stage('Tests', [
4141
custom_steps.test_windows_python2_cpu(),
42-
custom_steps.test_windows_python3_cpu()
43-
])
42+
custom_steps.test_windows_python3_cpu(),
43+
custom_steps.test_windows_julia07_cpu(),
44+
custom_steps.test_windows_julia10_cpu()
45+
])
4446
}
4547
,
4648
failure_handler: {

ci/windows/test_jl07_cpu.ps1

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
7z x -y windows_package.7z
19+
20+
# set default output encoding to utf8
21+
$PSDefaultParameterValues['Out-File:Encoding'] = 'utf8'
22+
23+
$env:MXNET_HOME = [System.IO.Path]::GetFullPath('.\windows_package')
24+
$env:JULIA_URL = "https://julialang-s3.julialang.org/bin/winnt/x64/0.7/julia-0.7.0-win64.exe"
25+
$env:JULIA_DEPOT_PATH = [System.IO.Path]::GetFullPath('.\julia-depot')
26+
27+
$JULIA_DIR = [System.IO.Path]::GetFullPath('.\julia07')
28+
$JULIA = "$JULIA_DIR\bin\julia"
29+
30+
# Download most recent Julia Windows binary
31+
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12
32+
(New-Object System.Net.WebClient).DownloadFile($env:JULIA_URL, "julia-binary.exe")
33+
if (! $?) { Throw ("Error on downloading Julia Windows binary") }
34+
35+
# Run installer silently, output to C:\julia07\julia
36+
Start-Process -Wait "julia-binary.exe" -ArgumentList "/S /D=$JULIA_DIR"
37+
if (! $?) { Throw ("Error on installing Julia") }
38+
39+
& $JULIA -e "using InteractiveUtils; versioninfo()"
40+
41+
dir
42+
43+
$src='
44+
using Pkg
45+
Pkg.activate(".\\julia")
46+
Pkg.build()
47+
Pkg.test()
48+
'
49+
50+
$src > .\ci-build.jl
51+
52+
# Redirect all stderr output to stdout,
53+
# since Julia loggers output stuffs to stderr.
54+
# Then, stderr triggers powershell NativeCommandError.
55+
& $JULIA .\ci-build.jl 2>&1 | %{ "$_" }
56+
if ($LastExitCode -eq 1) { Throw ("Error") }

ci/windows/test_jl10_cpu.ps1

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
7z x -y windows_package.7z
19+
20+
# set default output encoding to utf8
21+
$PSDefaultParameterValues['Out-File:Encoding'] = 'utf8'
22+
23+
$env:MXNET_HOME = [System.IO.Path]::GetFullPath('.\windows_package')
24+
$env:JULIA_URL = "https://julialang-s3.julialang.org/bin/winnt/x64/1.0/julia-1.0.3-win64.exe"
25+
$env:JULIA_DEPOT_PATH = [System.IO.Path]::GetFullPath('.\julia-depot')
26+
27+
$JULIA_DIR = [System.IO.Path]::GetFullPath('.\julia10')
28+
$JULIA = "$JULIA_DIR\bin\julia"
29+
30+
# Download most recent Julia Windows binary
31+
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12
32+
(New-Object System.Net.WebClient).DownloadFile($env:JULIA_URL, "julia-binary.exe")
33+
if (! $?) { Throw ("Error on downloading Julia Windows binary") }
34+
35+
# Run installer silently, output to C:\julia10\julia
36+
Start-Process -Wait "julia-binary.exe" -ArgumentList "/S /D=$JULIA_DIR"
37+
if (! $?) { Throw ("Error on installing Julia") }
38+
39+
& $JULIA -e "using InteractiveUtils; versioninfo()"
40+
41+
dir
42+
43+
$src='
44+
using Pkg
45+
Pkg.activate(".\\julia")
46+
Pkg.build()
47+
Pkg.test()
48+
'
49+
50+
$src > .\ci-build.jl
51+
52+
# Redirect all stderr output to stdout,
53+
# since Julia loggers output stuffs to stderr.
54+
# Then, stderr triggers powershell NativeCommandError.
55+
& $JULIA .\ci-build.jl 2>&1 | %{ "$_" }
56+
if ($LastExitCode -eq 1) { Throw ("Error") }

julia/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ deps/src
88
deps/usr
99
deps/deps.jl
1010
.vscode
11+
/Manifest.toml

julia/Project.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name = "MXNet"
2+
uuid = "a7949054-b901-59c6-b8e3-7238c29bf7f0"
3+
authors = ["Chiyuan Zhang <pluskid@gmail.com>", "Valentin Churavy <vchuravy@mit.edu>", "Iblis Lin <iblis@hs.ntnu.edu.tw>"]
4+
version = "1.5.0"
5+
6+
[deps]
7+
BinDeps = "9e28174c-4ba2-5203-b857-d8d62c4213ee"
8+
Formatting = "59287772-0a20-5a39-b81b-1366585eb4c0"
9+
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
10+
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
11+
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
12+
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
13+
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
14+
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
15+
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
16+
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
17+
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
18+
19+
[compat]
20+
julia = "≥0.7"
21+
22+
[extras]
23+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
24+
25+
[targets]
26+
test = ["Test"]

julia/REQUIRE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
julia 0.6
1+
julia 0.7
22
Formatting
33
BinDeps
44
JSON

julia/appveyor.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

julia/deps/build.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ if HAS_CUDA
8686
if HAS_CUDNN
8787
@info("Found a CuDNN installation.")
8888
end
89-
@info("CUDA_HOME -> $(get(ENV, "CUDA_HOME", nothing))")
89+
@info("CUDA_HOME -> $(get(ENV, "CUDA_HOME", "nothing"))")
9090
else
9191
@info("Did not find a CUDA installation, using CPU-only version of MXNet.")
9292
end

0 commit comments

Comments
 (0)