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

allow libm_intrinsics fallback #985

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

djdisodo
Copy link

allow using libm software implementation as fallback

@djdisodo djdisodo requested review from eddyb and oisyn as code owners January 10, 2023 08:51
Copy link
Contributor

@eddyb eddyb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like it would be less effort to not have entries in the libm_intrinsics map for any function we don't want to hook at all.

Looking a bit closer at it, several LibmCustomIntrinsics are implemented by expanding them to GLSL ops, so I think the reason the remaining ones panic is that they were meant to be implemented the same way.

Do you have a specific subset in mind that you need?

}
*/
_ => return None
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commenting this stuff out doesn't seem the best. I think I understand what's going on, but maybe each of these should be evaluated to see if there is a GLSL fallback and removed from the LimCustomIntrinsic type entirely, if not.

It would be nice if the only software operations kept would be the ones that are relatively cheap (and mostly just operate on the binary representation).

@djdisodo
Copy link
Author

i need erf* functions and it doesn't seem to be on GLOps(i'm not sure)
since currently match has branch for all variant
should i remove erf* branches and make default branch or leave erf branches there

@djdisodo
Copy link
Author

@eddyb

@djdisodo djdisodo requested review from eddyb and removed request for oisyn January 15, 2023 02:33
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