You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Without MRE, we would only be able to help you to a limited extent, and attention to the issue would be limited. to know more about MRE refer to wikipedia and stackoverflow.
Error & Stacktrace ⚠️
Environment (please complete the following information):
julia>versioninfo()
Julia Version 1.10.4
Commit 48d4fd4843 (2024-06-0410:41 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU:32× AMD Ryzen 97950X 16-Core Processor
WORD_SIZE:64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, znver3)
Threads:16 default, 0 interactive, 8 GC (on 32 virtual cores)
Environment:
JULIA_EDITOR = code.cmd
JULIA_NUM_THREADS =16
Additional context
I noticed this problem when generating runtime functions for FastDifferentiation.jl. I expected the runtime functions to accept a single array argument but instead they accept any number, and apparently type, of arguments and ignore all but the first. This could be confusing to an end user of my package.
Yeah it seems to just be dropped. Since RGFs are single dispatch functions it doesn't effect a whole lot of functionality, but it does mean you miss error reporting which would be good to have. It might be in the macro parsing that it needs to get fixed. Since the generated function https://github.com/SciML/RuntimeGeneratedFunctions.jl/blob/master/src/RuntimeGeneratedFunctions.jl#L254 has to have a fixed dispatch over all RGFs, I don't think you can leave it as dispatch information. But what you could do is capture that information about allowed types and lower it to being error checks in the generated function, and throw a methoderror if the type assertion fails. That would be rather easy to do, wouldn't require changing anything but the macro infrastructure https://github.com/SciML/RuntimeGeneratedFunctions.jl/blob/master/src/RuntimeGeneratedFunctions.jl#L59-L64, and would recover all of the functionality given single dispatching.
Note I just got back after an absence so I won't be taking a look at this (many other things are on the plate right now), but bump in a few months if still relevant and no one has gotten to it. That said, what is outlined above should be a half hour fix so I'll mark this as a good first contribution.
Describe the bug 🐞
type data for function arguments is not retained in runtime generated functions:
Expected behavior
Expected the runtime generated function to look like this:
with the type of
a
included in the function definition.Minimal Reproducible Example 👇
Without MRE, we would only be able to help you to a limited extent, and attention to the issue would be limited. to know more about MRE refer to wikipedia and stackoverflow.
Error & Stacktrace⚠️
Environment (please complete the following information):
using Pkg; Pkg.status()
using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
versioninfo()
Additional context
I noticed this problem when generating runtime functions for FastDifferentiation.jl. I expected the runtime functions to accept a single array argument but instead they accept any number, and apparently type, of arguments and ignore all but the first. This could be confusing to an end user of my package.
Don't know if this behavior was intentional or not, assumed it was a bug. If it's not feel free to move this to the feature request category.
The text was updated successfully, but these errors were encountered: