-
Notifications
You must be signed in to change notification settings - Fork 225
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
Add proof of concept for NVRTC support #1170
Conversation
Thanks for setting this up @mborland! And ccing @steppi here. Yes, NVRTC is quite strict, but unfortunately it's used in various places so we would need to support it. We went through this as well, and our solution indeed was just to alias the relevant parts of |
@izaid, @steppi, @dschmitz89 Do any of you want or need ROCm support as long as we are going back through this? edit: To me it doesn't seem especially valuable since there's translations available from SYCL or CUDA code. Looks more like additional maintenance without a ton of benefit. |
I don't think we need ROCm support, CUDA is the big win. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1170 +/- ##
===========================================
+ Coverage 94.06% 94.08% +0.01%
===========================================
Files 780 780
Lines 65797 65797
===========================================
+ Hits 61892 61904 +12
+ Misses 3905 3893 -12
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Since our calls are all unqualified, can we not just change BOOST_MATH_STD_USING to point to the appropriate namespace? |
@izaid and I wanted to do the equivalent of this in SciPy. The hitch was that to get things working in CuPy (which uses NVRTC) we needed a patchwork of different namespaces. |
The equivalent of |
It's not unreasonable to push this to Config: I'm sure other libraries could make use of this stuff too... but do we want to support this in standalone mode? It might be worth at least raising this on the mailing list? |
I would keep the original copies here in math so we can continue supporting standalone mode, because that is what the Python packages depend on. I'll post on the ML. |
Looks like the ML is in favor of everything going in it's own library. Pending any other comments I think this is a good limited proof that we can make it work. I'll keep building out the basic functions e.g. |
Development and completed CUDA runs can be found here: cppalliance/cuda-math#8
This one was requested by @izaid for CuPy usage. To me it seems beneficial to just alias libcu++ anywhere we can for this level of support because NVRTC has extremely strict rules. We're going to have to create aliases to everything in
std::
to either point tocuda::std::
,thrust::
, or roll our own implementation for things that don't exist such as the already completed implementation of<limits>
. I'm also not quite sure how to pass relative paths tonvrtcCompileProgram
so right now I have everything as hard-coded full paths. This is also for runtime compilation so we get less useful results out of just compilation than we do with NVCC here, but everything is still run first through the cuda-math repo.Any thoughts: @jzmaddock, @ckormanyos, @NAThompson?