Skip to content

Commit 0d16973

Browse files
Merge pull request #204 from aviks/as/jll
Update package to use jll
2 parents 7de2230 + dbb1d7b commit 0d16973

File tree

6 files changed

+67
-72
lines changed

6 files changed

+67
-72
lines changed

.travis.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ language: julia
44
os:
55
- linux
66
- osx
7-
# - windows
8-
7+
# - windows
8+
99
julia:
10-
- 1.0
1110
- 1.3
11+
- 1
1212
- nightly
1313

1414
matrix:
@@ -28,4 +28,3 @@ env:
2828
# Submit to Codecov
2929
after_success:
3030
- julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder())';
31-

Manifest.toml

Lines changed: 52 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
11
# This file is machine-generated - editing it directly is not advised
22

3-
[[BinaryProvider]]
4-
deps = ["Libdl", "SHA"]
5-
git-tree-sha1 = "5b08ed6036d9d3f0ee6369410b830f8873d4024c"
6-
uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
7-
version = "0.5.8"
3+
[[Base64]]
4+
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
5+
6+
[[Dates]]
7+
deps = ["Printf"]
8+
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
9+
10+
[[Distributed]]
11+
deps = ["Random", "Serialization", "Sockets"]
12+
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"
13+
14+
[[InteractiveUtils]]
15+
deps = ["Markdown"]
16+
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
17+
18+
[[LibGit2]]
19+
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
820

921
[[Libdl]]
1022
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
@@ -13,6 +25,31 @@ uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
1325
deps = ["Libdl"]
1426
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1527

28+
[[Logging]]
29+
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
30+
31+
[[Markdown]]
32+
deps = ["Base64"]
33+
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
34+
35+
[[NNPACK_jll]]
36+
deps = ["Libdl", "Pkg"]
37+
git-tree-sha1 = "c3d1a616362645754b18e12dbba96ec311b0867f"
38+
uuid = "a6bfbf70-4841-5cb9-aa18-3a8ad3c413ee"
39+
version = "2018.6.22+0"
40+
41+
[[Pkg]]
42+
deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Test", "UUIDs"]
43+
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
44+
45+
[[Printf]]
46+
deps = ["Unicode"]
47+
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"
48+
49+
[[REPL]]
50+
deps = ["InteractiveUtils", "Markdown", "Sockets"]
51+
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
52+
1653
[[Random]]
1754
deps = ["Serialization"]
1855
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
@@ -29,6 +66,9 @@ uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
2966
[[Serialization]]
3067
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
3168

69+
[[Sockets]]
70+
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"
71+
3272
[[SparseArrays]]
3373
deps = ["LinearAlgebra", "Random"]
3474
uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
@@ -37,6 +77,13 @@ uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
3777
deps = ["LinearAlgebra", "SparseArrays"]
3878
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
3979

80+
[[Test]]
81+
deps = ["Distributed", "InteractiveUtils", "Logging", "Random"]
82+
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
83+
4084
[[UUIDs]]
4185
deps = ["Random", "SHA"]
4286
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
87+
88+
[[Unicode]]
89+
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"

Project.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
name = "NNlib"
22
uuid = "872c559c-99b0-510c-b3b7-b6c96a88d5cd"
3-
version = "0.6.6"
3+
version = "0.6.7"
44

55
[deps]
6-
BinaryProvider = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
76
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
87
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
8+
NNPACK_jll = "a6bfbf70-4841-5cb9-aa18-3a8ad3c413ee"
9+
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
910
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
1011
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
1112

1213
[compat]
13-
BinaryProvider = "0.5"
1414
Requires = "0.5, 1.0"
15-
julia = "1"
15+
julia = "1.3"
1616

1717
[extras]
1818
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

deps/build.jl

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

src/NNlib.jl

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
module NNlib
2+
using Pkg
23
using Requires
4+
using NNPACK_jll
35

46
# Include APIs
57
include("dim_helpers.jl")
68

7-
# NNPACK support
8-
include(joinpath(@__DIR__, "..", "deps", "deps.jl"))
9-
if check_deps() == nothing
9+
10+
if isdefined(NNPACK_jll, :libnnpack)
1011
include("nnpack/NNPACK.jl")
1112
else
13+
@warn "NNPACK not available for your platform: " *
14+
"$( Pkg.BinaryPlatforms.platform_name(Pkg.BinaryPlatforms.platform_key_abi()))" *
15+
"($( Pkg.BinaryPlatforms.triplet(Pkg.BinaryPlatforms.platform_key_abi())))
16+
You will be able to use only the default Julia NNlib backend"
1217
is_nnpack_available() = false
1318
end
1419

src/nnpack/NNPACK.jl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ include("libnnpack.jl")
44
include("performance.jl")
55
include("interface.jl")
66

7-
const depsjl_path = joinpath(dirname(@__FILE__), "..", "..", "deps", "deps.jl")
8-
if !isfile(depsjl_path)
9-
error("NNPACK not installed properly, run Pkg.build(\"NNlib\"), restart Julia and try again")
10-
end
117

128
const shared_threadpool_dict = Dict{UInt64, Base.RefValue}()
139

@@ -17,7 +13,6 @@ const shared_threadpool_dict = Dict{UInt64, Base.RefValue}()
1713
Checks if the current hardware is supported by NNPACK.
1814
"""
1915
function is_nnpack_available()
20-
check_deps() isa Nothing || return false
2116
status = nnp_initialize()
2217
if status == nnp_status_unsupported_hardware
2318
return false
@@ -42,7 +37,6 @@ function allocate_threadpool()
4237
end
4338

4439
@init begin
45-
check_deps()
4640
status = nnp_initialize()
4741
if status == nnp_status_unsupported_hardware
4842
@warn "Hardware is unsupported by NNPACK so falling back to default NNlib"

0 commit comments

Comments
 (0)