Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Implement math builtin frexp, modf, sincos #1007

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

Merged
merged 4 commits into from
Apr 25, 2023

Conversation

fxzjshm
Copy link
Contributor

@fxzjshm fxzjshm commented Apr 9, 2023

Implemented frexp, modf and sincos using existing math builtins for hiplike and ze backend.

Re-implementation of sincos is intended for better performance, although haven't benchmarked.

Tested ROCm backend on gfx906, CUDA backend on sm_86; currently I have no access to Intel GPUs, so cannot test ze backend...

@fxzjshm fxzjshm marked this pull request as ready for review April 10, 2023 03:25
Copy link
Collaborator

@illuhad illuhad left a comment

Choose a reason for hiding this comment

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

Thanks! I think the SSCP compiler already supports these builtins. So, for Intel, you could just see what the SPIR-V SSCP builtins do - if they do the same thing as you are doing here, it's probably fine :-)

@@ -165,7 +166,9 @@ HIPSYCL_BUILTIN T __hipsycl_minmag(T x, T y) noexcept {

// Not yet supported
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we can remove this comment now :-)

@fxzjshm
Copy link
Contributor Author

fxzjshm commented Apr 12, 2023

Oh accidentally forgot that... Thanks for reviewing!

@fxzjshm fxzjshm requested a review from illuhad April 17, 2023 16:06
Copy link
Collaborator

@illuhad illuhad left a comment

Choose a reason for hiding this comment

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

Thanks!

@illuhad illuhad merged commit 7004325 into AdaptiveCpp:develop Apr 25, 2023
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