@@ -4,33 +4,38 @@ using BinaryProvider
4
4
const verbose = " --verbose" in ARGS
5
5
const prefix = Prefix (get ([a for a in ARGS if a != " --verbose" ], 1 , joinpath (@__DIR__ , " usr" )))
6
6
products = [
7
- LibraryProduct (prefix, " libnnpack" , :libnnpack )
7
+ LibraryProduct (prefix, [ " libnnpack" ] , :libnnpack ),
8
8
]
9
9
10
10
# Download binaries from hosted location
11
- bin_prefix = " https://github.com/avik-pal/NNPACKBuilder /releases/download/v0.1 "
11
+ bin_prefix = " https://github.com/JuliaPackaging/Yggdrasil /releases/download/NNPACK-v2018.06.22-0 "
12
12
13
13
# Listing of files generated by BinaryBuilder:
14
14
download_info = Dict (
15
- Linux (:aarch64 , :glibc ) => (" $bin_prefix /NNPACK.v2018.6.22.aarch64-linux-gnu.tar.gz" , " 27037ad8384dc8d9dff79c6dae9d852f8b4aa60dcc84fb605f1856042d125e63" ),
16
- Linux (:i686 , :glibc ) => (" $bin_prefix /NNPACK.v2018.6.22.i686-linux-gnu.tar.gz" , " 383264bbba19980a097662e4f3364e97ec6ab7e7e792663f8192595cf86a0ebe" ),
17
- Linux (:x86_64 , :glibc ) => (" $bin_prefix /NNPACK.v2018.6.22.x86_64-linux-gnu.tar.gz" , " fe1870a89b8d80ffd37d20681c22cdb9b86f18b4539127455d9025a0e6720bba" ),
15
+ Linux (:aarch64 , libc= :glibc ) => (" $bin_prefix /NNPACK.v2018.6.22.aarch64-linux-gnu.tar.gz" , " e0c6e21ba4c47acfd5a3d3e3510e8786474080f654338f4583b88860296c1437" ),
16
+ Linux (:i686 , libc= :glibc ) => (" $bin_prefix /NNPACK.v2018.6.22.i686-linux-gnu.tar.gz" , " e9b6685001bc5a5d17acef15f3f6ffeb7beb6081926300f23ed4a442beac71ca" ),
17
+ Linux (:i686 , libc= :musl ) => (" $bin_prefix /NNPACK.v2018.6.22.i686-linux-musl.tar.gz" , " 36c1d3c30b3bc3e0b34f215945bb46319f88e28f011fc758f21ba888b1fd9e25" ),
18
+ MacOS (:x86_64 ) => (" $bin_prefix /NNPACK.v2018.6.22.x86_64-apple-darwin14.tar.gz" , " b30046223a11470b15a2ceb0d0df6f7d8a43260fe52f4a2f8ebe5f0b2df822ca" ),
19
+ Linux (:x86_64 , libc= :glibc ) => (" $bin_prefix /NNPACK.v2018.6.22.x86_64-linux-gnu.tar.gz" , " 150d5b6ca81fa72bfdc8bbda2428f0d3483fd11a5813724646c6d6c6a7ef969f" ),
20
+ Linux (:x86_64 , libc= :musl ) => (" $bin_prefix /NNPACK.v2018.6.22.x86_64-linux-musl.tar.gz" , " d961a104f814ec5b356519a82746a70a1df193ae37fc8130f38ffb61336def16" ),
18
21
)
19
22
20
23
# Install unsatisfied or updated dependencies:
21
24
unsatisfied = any (! satisfied (p; verbose= verbose) for p in products)
22
- if haskey (download_info, platform_key ())
23
- url, tarball_hash = download_info[platform_key ()]
24
- if unsatisfied || ! isinstalled (url, tarball_hash; prefix= prefix)
25
- # Download and install binaries
26
- install (url, tarball_hash; prefix= prefix, force= true , verbose= verbose)
27
- end
28
-
29
- # Write out a deps.jl file that will contain mappings for our products
30
- write_deps_file (joinpath (@__DIR__ , " deps.jl" ), products)
31
- elseif unsatisfied
32
- # If we don't have a BinaryProvider-compatible .tar.gz to download, complain.
25
+ dl_info = choose_download (download_info, platform_key_abi ())
26
+ if dl_info === nothing && unsatisfied
27
+ # If we don't have a compatible .tar.gz to download, complain.
33
28
# Alternatively, you could attempt to install from a separate provider,
34
29
# build from source or something even more ambitious here.
35
- @warn " Your platform $(triplet (platform_key ())) is not supported by this NNPACK. So building NNlib without NNPACK"
30
+ error (" Your platform (\" $(Sys. MACHINE) \" , parsed as \" $(triplet (platform_key_abi ())) \" ) is not supported by this package!" )
31
+ end
32
+
33
+ # If we have a download, and we are unsatisfied (or the version we're
34
+ # trying to install is not itself installed) then load it up!
35
+ if unsatisfied || ! isinstalled (dl_info... ; prefix= prefix)
36
+ # Download and install binaries
37
+ install (dl_info... ; prefix= prefix, force= true , verbose= verbose)
36
38
end
39
+
40
+ # Write out a deps.jl file that will contain mappings for our products
41
+ write_deps_file (joinpath (@__DIR__ , " deps.jl" ), products, verbose= verbose)
0 commit comments