-
-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rename extensions #476
rename extensions #476
Conversation
I don't think we can rename NNlibCUDA because the extension name has to match the module name, and the module name has to match the registered package name. Likewise we'd need a way to run just the NNlibCUDA tests when someone calls |
I thought that the plan was to not have a NNlibCUDA package anymore, just an extension of NNlib. |
We can't do that unless we want to stop supporting Julia <1.9 in both NNlib and Flux. |
why not? in the end we will want an extension in any case, it is the right fit for our use case. What are the alternatives? NNlibCUDA just as a subpackage or it is possible to have it as a subpackage and an extension at the same time? What was your intent with #445? |
It means maintaining backport branches for any bugfixes or enhancements we want to make available for Julia 1.6-1.8 users. My recollection of the last time we tried this for Flux was that it didn't go great.
I think so, which is why I stopped working on #445 and submitted #471 first. However, I believe this requires us to keep the subpackage name as NNlibCUDA. Which means the extension name has to be NNlibCUDA (no Ext). If anyone knows of a way around that, please do chime in. |
We can leave |
@ToucheSir I'm not sure this subpackage AND extension thing is supported. Extensions are supposed to be located at With package images and extensions, julia 1.9 brings so much to the table that users and package developers will switch quickly to it, I don't see the need to keep supporting older versions. Also, I don't see such critical hotfixes these days that would make me worry about backporting. |
I think it would be sufficient to add a
My worry is that it's just too early to ascertain whether there will be a switch en masse. 1.8 also brought great improvements for inference and TTFX, but as of a couple months ago I was seeing issues/questions from people at organizations using Julia who were running 1.7... |
Was it due to some Julia infrastructure limitation? With push to 1.9 we can also start using KernelAbstractions and drastically reduce the amount of work needed to add functionality to different backends. |
I don't quite remember and I can't seem to find issues talking about it now. @CarloLucibello would though. The registrator should work, but no idea if TagBot would. My recollection of the problem was that commits either made it onto the wrong branch or not all commits that needed to be backported were backported before a release was cut. Certainly if we wanted to do this going forward, I reckon we'd have to be a little more fastidious about squashing/rebasing PRs with lots of intermediate testing commits.
This was another factor, but I noticed recently that KA master lowered the Julia compat bound to 1.6? Maybe something to do with using it in GPUArrrays + CUDA.jl. |
Maybe if we are not sure about the status of NNlibCUDA, we can go ahead only with AMDGPU for now? I'm not sure that the amount of users that do not want to migrate to newer Julia versions is big and is more likely to be low. They certainly are not relying on some new features to come. |
In hindsight #471 should've been merged into
module NNlibCUDA
include("everything_inside.jl")
end # module
module NNlibCUDAExt
include("[../]NNlibCUDA/src/everything_inside.jl")
end # module It's not the prettiest since we'll still have this Alternatively, we could soft undo #471 by deleting
Edit: re-merging does work for option 2/3, but we get basically duplicate commits in the history. Thoughts? |
Another option is to reintroduce NNlibCUDA in this repo under
|
Don't think that would work because it introduces a circular dependency. |
what do you mean? |
Reintroducing NNlibCUDA as a Requires dependency of NNlib introduces a circular dependency because NNlib is a dependency of NNlibCUDA. One way to get around this would be to just copy the NNlibCUDA code and put it behind a |
Maybe a good compromise is |
I'm a little confused by your proposal, since the link talks about migrating normal dependencies to weak ones. Since NNlib is a dependency of NNlibCUDA and not the other way around, I don't understand how it applies here (compared to e.g. Flux where it would apply, because Flux depends on NNlibCUDA). Can you elaborate on the concrete changes which would have to be made to this repo? |
@ToucheSir sorry that was me waking up confused in the middle of the night. The first proposal in #476 (comment) for having both a subpackage and an extension should in principle work but:
Just dropping <1.9 support seems to me the best option by far. In case of the unlikely event of backports needed, backports will be made. |
We could probably make at least Summarizing the current most popular option to make sure we're all on the same page:
Does that sound right? |
yes. I will repurpose this PR to do that |
closing in favor of #481 |
Renaming extensions based on the discussion in JuliaMath/ChangesOfVariables.jl#13
Also done some extra cleaning of the CUDA extension (just removed all the non-source files and moved the tests to
test/ext_cuda/
) but still without actually hooking it (to be done in #445).