Skip to content

Conversation

@DilumAluthge
Copy link
Member

@DilumAluthge DilumAluthge commented Jan 10, 2021

  • New version: CUDA v2.5.0
  • UUID: 052768ef-5323-5732-b1bb-66c8b64840ba
  • Tree: 2ed30f30c8905cea954b0904a98211745b3818f5

This pull request uses LocalRegistry.jl to register CUDA.jl version 2.5.0 from the master branch of CUDA.jl.


For posterity, here is the Bash script that I ran to generate this pull request. I used the latest Julia master.

rm -rf ~/.julia
rm -rf temp-localregistry
mkdir temp-localregistry
cd temp-localregistry
git clone git@github.com:JuliaRegistries/General.git General
cd General
git checkout master
git checkout -B dpa/register-cuda-2.5.0
cd ..
julia -e 'import Pkg; Pkg.Registry.add(Pkg.Registry.RegistrySpec(path = joinpath(pwd(), "General")))'
rm -rf General
git clone https://github.com/JuliaGPU/CUDA.jl.git CUDA.jl
cd CUDA.jl
git checkout master
cd ..
julia -e 'import Pkg; Pkg.develop(Pkg.PackageSpec(path = joinpath(pwd(), "CUDA.jl")))'
julia -e 'import Pkg; Pkg.add(Pkg.PackageSpec(name = "LocalRegistry", uuid = "89398ba2-070a-4b16-a995-9893c55d93cf", version = "0.3.1"))'
julia -e 'import InteractiveUtils; InteractiveUtils.versioninfo()'
julia -e 'import Pkg; Pkg.status(; mode = Pkg.PKGMODE_PROJECT)'
julia -e 'import Pkg; Pkg.status(; mode = Pkg.PKGMODE_MANIFEST)'
julia -e 'import LocalRegistry; LocalRegistry.register("CUDA", "General")'
cd ..
rm -rf temp-localregistry
cd ~/.julia/registries/General
git push -f origin dpa/register-cuda-2.5.0
cd ~
rm -rf ~/.julia
And here is the output: (click to expand)
$ rm -rf ~/.julia
$ rm -rf temp-localregistry
$ mkdir temp-localregistry
$ cd temp-localregistry
$ git clone git@github.com:JuliaRegistries/General.git General
Cloning into 'General'...
remote: Enumerating objects: 96, done.
remote: Counting objects: 100% (96/96), done.
remote: Compressing objects: 100% (91/91), done.
remote: Total 386704 (delta 24), reused 21 (delta 5), pack-reused 386608
Receiving objects: 100% (386704/386704), 114.02 MiB | 10.98 MiB/s, done.
Resolving deltas: 100% (213476/213476), done.
Updating files: 100% (19408/19408), done.
$ cd General
$ git checkout master
Already on 'master'
Your branch is up to date with 'origin/master'.
$ git checkout -B dpa/register-cuda-2.5.0
Switched to a new branch 'dpa/register-cuda-2.5.0'
$ cd ..
$ julia -e 'import Pkg; Pkg.Registry.add(Pkg.Registry.RegistrySpec(path = joinpath(pwd(), "General")))'
     Copying registry from `~/Downloads/temp-localregistry/General`
       Added registry `General` to `~/.julia/registries/General`
$ rm -rf General
$ git clone https://github.com/JuliaGPU/CUDA.jl.git CUDA.jl
Cloning into 'CUDA.jl'...
remote: Enumerating objects: 718, done.
remote: Counting objects: 100% (718/718), done.
remote: Compressing objects: 100% (269/269), done.
remote: Total 35164 (delta 338), reused 567 (delta 216), pack-reused 34446
Receiving objects: 100% (35164/35164), 8.00 MiB | 10.53 MiB/s, done.
Resolving deltas: 100% (23416/23416), done.
$ cd CUDA.jl
$ git checkout master
Already on 'master'
Your branch is up to date with 'origin/master'.
$ cd ..
$ julia -e 'import Pkg; Pkg.develop(Pkg.PackageSpec(path = joinpath(pwd(), "CUDA.jl")))'
Path `/Users/dilum/Downloads/temp-localregistry/CUDA.jl` exists and looks like the correct package. Using existing path.
   Resolving package versions...
   Installed Reexport ─────────── v0.2.0
   Installed MuladdMacro ──────── v0.2.2
   Installed AbstractFFTs ─────── v0.5.0
   Installed ExprTools ────────── v0.1.3
   Installed OrderedCollections ─ v1.3.2
   Installed NNlib ────────────── v0.7.11
   Installed GPUArrays ────────── v6.2.0
   Installed DataStructures ───── v0.18.8
   Installed Adapt ────────────── v3.0.0
   Installed TimerOutputs ─────── v0.5.7
   Installed Scratch ──────────── v1.0.3
   Installed MacroTools ───────── v0.5.6
   Installed Compat ───────────── v3.25.0
   Installed Requires ─────────── v1.1.2
   Installed GPUCompiler ──────── v0.9.1
   Installed LLVM ─────────────── v3.5.2
   Installed CEnum ────────────── v0.4.1
   Installed BFloat16s ────────── v0.1.0
   Installed ChainRulesCore ───── v0.9.24
Updating `~/.julia/environments/v1.7/Project.toml`
  [052768ef] + CUDA v2.5.0 `~/Downloads/temp-localregistry/CUDA.jl`
Updating `~/.julia/environments/v1.7/Manifest.toml`
  [621f4979] + AbstractFFTs v0.5.0
  [79e6a3ab] + Adapt v3.0.0
  [ab4f0b2a] + BFloat16s v0.1.0
  [fa961155] + CEnum v0.4.1
  [052768ef] + CUDA v2.5.0 `~/Downloads/temp-localregistry/CUDA.jl`
  [d360d2e6] + ChainRulesCore v0.9.24
  [34da2185] + Compat v3.25.0
  [864edb3b] + DataStructures v0.18.8
  [e2ba6199] + ExprTools v0.1.3
  [0c68f7d7] + GPUArrays v6.2.0
  [61eb1bfa] + GPUCompiler v0.9.1
  [929cbde3] + LLVM v3.5.2
  [1914dd2f] + MacroTools v0.5.6
  [46d2c3a1] + MuladdMacro v0.2.2
  [872c559c] + NNlib v0.7.11
  [bac558e1] + OrderedCollections v1.3.2
  [189a3867] + Reexport v0.2.0
  [ae029012] + Requires v1.1.2
  [6c6a2e73] + Scratch v1.0.3
  [a759f4b9] + TimerOutputs v0.5.7
  [0dad84c5] + ArgTools
  [56f22d72] + Artifacts
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [8bb1440f] + DelimitedFiles
  [8ba89e20] + Distributed
  [f43a241f] + Downloads
  [b77e0a4c] + InteractiveUtils
  [4af54fe1] + LazyArtifacts
  [b27032c2] + LibCURL
  [76f85450] + LibGit2
  [8f399da3] + Libdl
  [37e2e46d] + LinearAlgebra
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [a63ad114] + Mmap
  [ca575930] + NetworkOptions
  [44cfe95a] + Pkg
  [de0858da] + Printf
  [3fa0cd96] + REPL
  [9a3f8284] + Random
  [ea8e919c] + SHA
  [9e88b42a] + Serialization
  [1a1011a3] + SharedArrays
  [6462fe0b] + Sockets
  [2f01184e] + SparseArrays
  [10745b16] + Statistics
  [fa267f1f] + TOML
  [a4e569a6] + Tar
  [8dfed614] + Test
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode
  [e66e0078] + CompilerSupportLibraries_jll
  [deac9b47] + LibCURL_jll
  [29816b5a] + LibSSH2_jll
  [c8ffd9c3] + MbedTLS_jll
  [14a3606d] + MozillaCACerts_jll
  [83775a58] + Zlib_jll
  [8e850ede] + nghttp2_jll
$ julia -e 'import Pkg; Pkg.add(Pkg.PackageSpec(name = "LocalRegistry", uuid = "89398ba2-070a-4b16-a995-9893c55d93cf", version = "0.3.1"))'
    Updating registry at `~/.julia/registries/General`
    Updating git-repo `git@github.com:JuliaRegistries/General.git`
┌ Warning: Some registries failed to update:
│     — /Users/dilum/.julia/registries/General — branch origin/dpa/register-cuda-2.5.0 not found
└ @ Pkg.Types ~/dev/repos/JuliaLang/julia/usr/share/julia/stdlib/v1.7/Pkg/src/Types.jl:1183
   Resolving package versions...
   Installed AutoHashEquals ─ v0.2.0
   Installed RegistryTools ── v1.5.3
   Installed LocalRegistry ── v0.3.1
Updating `~/.julia/environments/v1.7/Project.toml`
  [89398ba2] + LocalRegistry v0.3.1
Updating `~/.julia/environments/v1.7/Manifest.toml`
  [15f4f7f2] + AutoHashEquals v0.2.0
  [89398ba2] + LocalRegistry v0.3.1
  [d1eb7eb1] + RegistryTools v1.5.3

27 dependencies successfully precompiled in 60 seconds
$ julia -e 'import InteractiveUtils; InteractiveUtils.versioninfo()'
Julia Version 1.7.0-DEV.243
Commit ffa966ee22 (2021-01-09 23:49 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin20.2.0)
  CPU: Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.0 (ORCJIT, haswell)
$ julia -e 'import Pkg; Pkg.status(; mode = Pkg.PKGMODE_PROJECT)'
Status `~/.julia/environments/v1.7/Project.toml`
  [052768ef] CUDA v2.5.0 `~/Downloads/temp-localregistry/CUDA.jl`
  [89398ba2] LocalRegistry v0.3.1
$ julia -e 'import Pkg; Pkg.status(; mode = Pkg.PKGMODE_MANIFEST)'
Status `~/.julia/environments/v1.7/Manifest.toml`
  [621f4979] AbstractFFTs v0.5.0
  [79e6a3ab] Adapt v3.0.0
  [15f4f7f2] AutoHashEquals v0.2.0
  [ab4f0b2a] BFloat16s v0.1.0
  [fa961155] CEnum v0.4.1
  [052768ef] CUDA v2.5.0 `~/Downloads/temp-localregistry/CUDA.jl`
  [d360d2e6] ChainRulesCore v0.9.24
  [34da2185] Compat v3.25.0
  [864edb3b] DataStructures v0.18.8
  [e2ba6199] ExprTools v0.1.3
  [0c68f7d7] GPUArrays v6.2.0
  [61eb1bfa] GPUCompiler v0.9.1
  [929cbde3] LLVM v3.5.2
  [89398ba2] LocalRegistry v0.3.1
  [1914dd2f] MacroTools v0.5.6
  [46d2c3a1] MuladdMacro v0.2.2
  [872c559c] NNlib v0.7.11
  [bac558e1] OrderedCollections v1.3.2
  [189a3867] Reexport v0.2.0
  [d1eb7eb1] RegistryTools v1.5.3
  [ae029012] Requires v1.1.2
  [6c6a2e73] Scratch v1.0.3
  [a759f4b9] TimerOutputs v0.5.7
  [0dad84c5] ArgTools
  [56f22d72] Artifacts
  [2a0f44e3] Base64
  [ade2ca70] Dates
  [8bb1440f] DelimitedFiles
  [8ba89e20] Distributed
  [f43a241f] Downloads
  [b77e0a4c] InteractiveUtils
  [4af54fe1] LazyArtifacts
  [b27032c2] LibCURL
  [76f85450] LibGit2
  [8f399da3] Libdl
  [37e2e46d] LinearAlgebra
  [56ddb016] Logging
  [d6f4376e] Markdown
  [a63ad114] Mmap
  [ca575930] NetworkOptions
  [44cfe95a] Pkg
  [de0858da] Printf
  [3fa0cd96] REPL
  [9a3f8284] Random
  [ea8e919c] SHA
  [9e88b42a] Serialization
  [1a1011a3] SharedArrays
  [6462fe0b] Sockets
  [2f01184e] SparseArrays
  [10745b16] Statistics
  [fa267f1f] TOML
  [a4e569a6] Tar
  [8dfed614] Test
  [cf7118a7] UUIDs
  [4ec0a83e] Unicode
  [e66e0078] CompilerSupportLibraries_jll
  [deac9b47] LibCURL_jll
  [29816b5a] LibSSH2_jll
  [c8ffd9c3] MbedTLS_jll
  [14a3606d] MozillaCACerts_jll
  [83775a58] Zlib_jll
  [8e850ede] nghttp2_jll
$ julia -e 'import LocalRegistry; LocalRegistry.register("CUDA", "General")'
┌ Info: Registering package
│   package_path = "/Users/dilum/Downloads/temp-localregistry/CUDA.jl"
│   registry_path = "/Users/dilum/.julia/registries/General"
│   package_repo = ""
│   uuid = UUID("052768ef-5323-5732-b1bb-66c8b64840ba")
│   version = v"2.5.0"
│   tree_hash = "2ed30f30c8905cea954b0904a98211745b3818f5"
└   subdir = ""
$ cd ..
$ rm -rf temp-localregistry
$ cd ~/.julia/registries/General
$ git push -f origin dpa/register-cuda-2.5.0
Enumerating objects: 13, done.
Counting objects: 100% (13/13), done.
Delta compression using up to 4 threads
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 1.50 KiB | 1.50 MiB/s, done.
Total 7 (delta 5), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (5/5), completed with 5 local objects.
remote:
remote: Create a pull request for 'dpa/register-cuda-2.5.0' on GitHub by visiting:
remote:      https://github.com/JuliaRegistries/General/pull/new/dpa/register-cuda-2.5.0
remote:
To github.com:JuliaRegistries/General.git
 * [new branch]            dpa/register-cuda-2.5.0 -> dpa/register-cuda-2.5.0
$ cd ~
$ rm -rf ~/.julia

After running the Bash script, I went to the GitHub website and created a new pull request to merge the dpa/register-cuda-2.5.0 branch into master.

@DilumAluthge DilumAluthge requested a review from maleadt January 10, 2021 02:38
@DilumAluthge DilumAluthge temporarily deployed to stopwatch January 10, 2021 02:38 Inactive
@DilumAluthge DilumAluthge force-pushed the dpa/register-cuda-2.5.0 branch from c00bf21 to 87c82ca Compare January 10, 2021 03:05
@DilumAluthge DilumAluthge temporarily deployed to stopwatch January 10, 2021 03:05 Inactive
DilumAluthge referenced this pull request in JuliaGPU/CUDA.jl Jan 10, 2021
[skip tests]
@DilumAluthge
Copy link
Member Author

@maleadt This is ready to review.

@DilumAluthge DilumAluthge requested review from maleadt and removed request for maleadt January 10, 2021 03:09
@DilumAluthge DilumAluthge reopened this Jan 10, 2021
@DilumAluthge DilumAluthge temporarily deployed to stopwatch January 10, 2021 10:20 Inactive
@DilumAluthge DilumAluthge force-pushed the dpa/register-cuda-2.5.0 branch from 87c82ca to 3613668 Compare January 11, 2021 03:18
@DilumAluthge DilumAluthge temporarily deployed to stopwatch January 11, 2021 03:18 Inactive
UUID: 052768ef-5323-5732-b1bb-66c8b64840ba
Tree: 2ed30f30c8905cea954b0904a98211745b3818f5
@DilumAluthge DilumAluthge force-pushed the dpa/register-cuda-2.5.0 branch from 3613668 to cd62ca9 Compare January 11, 2021 07:37
@DilumAluthge DilumAluthge temporarily deployed to stopwatch January 11, 2021 07:37 Inactive
Copy link
Contributor

@maleadt maleadt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@DilumAluthge DilumAluthge merged commit 589c280 into master Jan 11, 2021
@DilumAluthge DilumAluthge deleted the dpa/register-cuda-2.5.0 branch January 11, 2021 09:00
DilumAluthge added a commit that referenced this pull request Jan 11, 2021
@DilumAluthge
Copy link
Member Author

DilumAluthge commented Jan 11, 2021

I think this has caused bad things to happen in packages that depend on CUDA.jl when you try to run those packages on Julia < 1.6.

The reason is that the UUID 4af54fe1-eca0-43a8-85a7-787d91b784e3 doesn't match any registered package, and in Julia < 1.6 it doesn't match any standard library, so the resolver breaks.

Can we register a LazyArtifacts.jl package with this UUID in the General registry? So that packages that depend on CUDA.jl don't break on Julia < 1.6?

cc: @staticfloat @giordano @maleadt

See e.g. https://github.com/JuliaGPU/KernelAbstractions.jl/runs/1680372624 for a broken build on Julia 1.4:

ERROR: cannot find name corresponding to UUID 4af54fe1-eca0-43a8-85a7-787d91b784e3 in a registry

DilumAluthge added a commit that referenced this pull request Jan 11, 2021
@DilumAluthge
Copy link
Member Author

We could probably even have a LazyArtifacts "package" that has zero registered versions. So it can't actually be installed, but at least the resolver on Julia < 1.6 can map the UUID 4af54fe1-eca0-43a8-85a7-787d91b784e3 to an actual package.

@giordano
Copy link
Member

https://github.com/JuliaPackaging/LazyArtifacts.jl

@DilumAluthge
Copy link
Member Author

Register please?

And since the name LazyArtifacts is a stdlib in 1.6, I think it's fine to merge the registration of https://github.com/JuliaPackaging/LazyArtifacts.jl immediately.

@DilumAluthge
Copy link
Member Author

Oh boy merging this PR broke the entire Julia ecosystem 😬

At least it got reverted pretty quickly.

@giordano
Copy link
Member

Register please?

I don't have the time to do it right now, so please go ahead if you can do it. It'd also be good to test it actually works across all julia versions (well, v1.3+ I guess?), I never got around that

@giordano
Copy link
Member

The fact is that the package is likely completely useless in v1.3-v1.5. I added the same exports as in the standard library (at least those actually available in v1.5), for consistency, but perhaps an empty package is good enough. Someone needs to decide what to do in practice

@DilumAluthge
Copy link
Member Author

For the use case here (being able to register CUDA 2.5.0 in the General registry without breaking the General registry for everyone on Julia < 2.5), I think it's sufficient to register LazyArtifacts.jl without any versions.

This is done here: #27753

It would be good to get a sanity check to confirm that it's safe to register a package without any versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants