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

Optimized PTX IntrinsicMath implementation to use LibDevice. #1189

Merged
merged 3 commits into from
Apr 10, 2024

Conversation

MoFtZ
Copy link
Collaborator

@MoFtZ MoFtZ commented Apr 8, 2024

Extracted from #1148.

Depends on #1187 and #1185.

PTXMath in ILGPU.Algorithms provides a number of math functions using Cordic implemenentations. However, these are considerably slower compared to LibDevice.

Currently, LibDevice methods need to be explicitly called.

This PR automatically tries to initialize LibDevice when the Context is being configured. If found, all the Math intrinsics are redirected to using LibDevice. The Cordic implementation in ILGPU.Algorithms will only activate itself if LibDevice is not available.

@MoFtZ MoFtZ force-pushed the feature/xmath-libdevice branch 2 times, most recently from 46efee6 to 7454a8b Compare April 9, 2024 06:11
@MoFtZ MoFtZ force-pushed the feature/xmath-libdevice branch from 7454a8b to 152a938 Compare April 9, 2024 10:51
@MoFtZ MoFtZ merged commit b81e422 into m4rs-mt:master Apr 10, 2024
51 checks passed
@MoFtZ MoFtZ deleted the feature/xmath-libdevice branch April 10, 2024 07:21
@MoFtZ MoFtZ added this to the v2.0 milestone Apr 10, 2024
@MoFtZ MoFtZ added enhancement feature A new feature (or feature request) labels Apr 10, 2024
@MoFtZ MoFtZ modified the milestones: v2.0, v1.5.2 Apr 18, 2024
MoFtZ added a commit to MoFtZ/ILGPU that referenced this pull request Apr 18, 2024
MoFtZ added a commit to MoFtZ/ILGPU that referenced this pull request Apr 18, 2024
MoFtZ added a commit to MoFtZ/ILGPU that referenced this pull request Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature A new feature (or feature request)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants