Skip to content

Comments

Fix device_functions macro#1

Open
KSepetanc wants to merge 4 commits intoeschnett:eschnett/julia-1.13from
KSepetanc:eschnett/julia-1.13
Open

Fix device_functions macro#1
KSepetanc wants to merge 4 commits intoeschnett:eschnett/julia-1.13from
KSepetanc:eschnett/julia-1.13

Conversation

@KSepetanc
Copy link

I made if-else to capture new temp variable from definition in Julia 1.13.
If I did not error, this should fix the macro.

After this, swap of device_functions for device_function should be reverted.

@eschnett
Copy link
Owner

Can you add to your PR some code that uses the macro? This will show that the macro works. For example, you could undo the change away from @device_functions.

@KSepetanc
Copy link
Author

KSepetanc commented Feb 11, 2026

No errors on my end. Tried it with undone change of @device_functions (deved local branch that matches this PR).
Works both on 1.12 and 1.13. Try it yourself before merge.

To test this and to avoid unrelated issue, I got system CUDA updated to 13.1.

   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.13.0-beta2 (2026-02-04)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org release
|__/                   |

(@v1.13) pkg> st
Status `C:\Users\karlo\.julia\environments\v1.13\Project.toml`
  [052768ef] CUDA v5.9.6 `E:\CUDA.jl`

julia> using CUDA

julia>
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.12.5 (2026-02-09)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org release
|__/                   |

(@v1.12) pkg> st
Status `C:\Users\karlo\.julia\environments\v1.12\Project.toml`
  [052768ef] CUDA v5.9.6 `E:\CUDA.jl\`

julia> using CUDA

julia>

@eschnett
Copy link
Owner

I am currently (and have been for two weeks) fighting with the CUDA.jl CI infrastructure to make sure that the package passes with my changes. This is turning out to be quite a bit more difficult and frustrating than I expected. (One reason is that CUDA.jl currently only tests Julia 1.11 and CUDA 12.9, and trying anything more modern uncovers problems that are unrelated to supporting Julia 1.13.)

Unfortunately, the CUDA.jl CI infrastructure does not run on your PR because buildkite isn't set up for my clone of the CUDA.jl repo, so I would be flying blind when merging your changes.

In any way, I will hold off merging your changes until my current PR passes the CUDA.jl CI pipeline to avoid working on too many fronts simultaneously.

@KSepetanc
Copy link
Author

CUDA.jl CI is passing now on main PR. Could you try this fix? The macro is needed so other PR can be merged (for AOT compilation).

@eschnett
Copy link
Owner

Can we merge the two PRs one after the other?

Alternative, you could open a PR against the main CUDA.jl repository which includes my changes.

@KSepetanc KSepetanc force-pushed the eschnett/julia-1.13 branch 2 times, most recently from fccbe1c to a7439dc Compare February 18, 2026 22:01
@KSepetanc
Copy link
Author

Check it out JuliaGPU#3031.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants