Move AbstractGPUArrayStyle to GPUArraysCore?#417
Conversation
We're using Alternatively, we could use strict version requirements in GPUArrays (i.e. EDIT: you could try this on CI by splitting the move in two commits (having duplicate definitions for the first commit, only removing it in the second). We can then squash merge, but CI would test the scenario where there are two definitions from an upgraded Core package with an old GPUArrays. |
|
That's a good idea. 98530a1 has the definition in both packages, and we can see what CI thinks. I see no complaints. But, with this change, the following seems pretty odd to me: julia> using Metal, GPUArraysCore
julia> @which Metal.AbstractGPUArrayStyle
GPUArrays
julia> @which GPUArraysCore.AbstractGPUArrayStyle
GPUArraysCore
julia> Metal.AbstractGPUArrayStyle === GPUArraysCore.AbstractGPUArrayStyle
falseIt means that a package which uses |
|
Yeah, that's not great. I think the easiest solution is to lock GPUArrays to GPUArraysCore (i.e. edit the registry to have |
|
Yes, I guess that every GPUArrays version demanding exactly one GPUArraysCore version sounds safest. The only downside I can see is that, if you want to make some small change to GPUArraysCore, you will need to tag a new version of the main package before anyone can use it. But presumably there will be few such changes. And most PRs to GPUArrays won't alter GPUArraysCore at all. This change can be GPUArraysCore 0.2, or 0.11. The argument for 0.2 is that it's not in fact a bugfix. The argument for 0.11 is that there's no need for anyone who already depends on GPUArraysCore to update their package for the new version. There seem to be 7 direct dependents now: https://juliahub.com/ui/Packages/GPUArraysCore/qiYUe/0.1.0?page=2 Tests here of GPUArrays do already load the latest Core version, not the registered one, which is good: |
That happened quickly! We better stick to |
|
Ok, 0.1.1 it is. I made JuliaRegistries/General#64447 to add a version bound. I guess that should be merged first, then GPUArraysCore tagged, then GPUArrays tagged. |
RFC, I guess. But it would be useful to be able to dispatch on this, as for example here:
https://github.com/FluxML/Zygote.jl/blob/master/src/lib/broadcast.jl#L270
What order to tag things in may need careful thought. Does the main package needs an upper bound on the core in order not to create a clash, or can that be avoided somehow?