Skip to content
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

Can you remove NanMath from build_function output? #1100

Open
ejmeitz opened this issue Mar 23, 2024 · 5 comments
Open

Can you remove NanMath from build_function output? #1100

ejmeitz opened this issue Mar 23, 2024 · 5 comments

Comments

@ejmeitz
Copy link

ejmeitz commented Mar 23, 2024

Is there a way to tell Symbolics to build a function without the use of NanMath? I'm using the generated functions inside one of my packages and would like to not have the extra dependency. Its not a big deal if you cannot.

@ChrisRackauckas
Copy link
Member

You can pass nanmath=false.

@ejmeitz
Copy link
Author

ejmeitz commented Mar 23, 2024

Are there docs anywhere on incorporating a function made by build_function into a package? There's no version of build_function that targets a Julia output that have the fname parameter so all the functions I make are nameless and I can't call them. I have way to many generated functions to add the names manually and its also too slow to generate them at runtime.

@ChrisRackauckas
Copy link
Member

I don't understand, you can just gensym if you want?

@ejmeitz
Copy link
Author

ejmeitz commented Mar 24, 2024

Right now I call build_function with expr false and I save that to a file. I get something like : function (ˍ₋arg1,) ... end printed to my file. I just want to give those functions human readable names. Also is there any way to make the compile time of these functions faster? Its painfully slow for something that is just a bunch of multiplication and additions.

@ChrisRackauckas
Copy link
Member

It's an anonymous function, it doesn't have a name.

Also is there any way to make the compile time of these functions faster? Its painfully slow for something that is just a bunch of multiplication and additions.

JuliaSimCompiler has a few techniques to accelerate it by directly targeting LLVM and doing custom passes.

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

No branches or pull requests

2 participants