Replies: 3 comments 3 replies
-
I'm likely supportive, but would like to better understand the benefits of using c++20 first. How will it improve performance? We started MUQ in 2012 just after c++11 came out and made the decision to rely on c++11 features (like smart pointers). There were a couple years where that was slightly limiting, but eventually it was no big deal and was definitely worth it in the long run. This could be a similar time for MParT. |
Beta Was this translation helpful? Give feedback.
-
In theory, one could make a Another, more complicated, example: I'm still trying to work on implementing alternate 1d basis to just polynomials within Anyway, this is why it's complicated, but it can pay off; creating functions we call a lot that can be resolved at compile time will improve performance--I'm inclined to add "dramatically", and inclined to say that this will be even more noticeable for CUDA. On a much more benign note, I really like the new string formatting tools in C++20 (they make C++ string formatting like python). |
Beta Was this translation helpful? Give feedback.
-
Yes, something I meant to (but forgot to include) is that you do require CUDA 12, which is only available on >=Maxwell (i.e. within the past ~8ish years). I'm in no rush. I agree that the top level classes shouldn't matter, I'm mostly worried about the embedded MultivariateExpansionWorker within MonotoneIntegrand, which would get called a whole lot when, e.g., inverting a rectified polynomial component.
…________________________________
From: Matt Parno ***@***.***>
Sent: Thursday, October 26, 2023 9:41 AM
To: MeasureTransport/MParT ***@***.***>
Cc: Daniel Garner Sharp ***@***.***>; Author ***@***.***>
Subject: Re: [MeasureTransport/MParT] Newer libraries (Discussion #356)
I don't think we have many (if any) virtual functions that get called a lot. I tried to be pretty careful with that early on and actually wouldn't expect much of a performance change if we removed the few remaining virtual functions we have in the top level classes, but I may be wrong. That said, I think it could be a very good idea to use a concept to formalize the requirements on 1d basis functions and classes like MultivariateExpansionWorker.
My only real concern is that we would lose support for somewhat recent but not cutting edge versions of CUDA (like what I use). I'll do some testing to see if I can mix concepts with cuda in my environment. Worst case we can wait a bit until these recent CUDA versions are more ubiquitous.
—
Reply to this email directly, view it on GitHub<#356 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AKJG6T5F4FU4VLHUHF56K4LYBJSCHAVCNFSM6AAAAAA6OPWZA2VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TGOJTGEZTS>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
With the advent of C++20, one can use concepts and constraints, and cuda just officially supported C++20 in the past year or so in 12.xx. I'd be happy to talk about why this can improve our code from a performance perspective. Is it worth saying "We should build for C++20" and fixing any issues that may arise? In theory, this prevents us from deploying on certain machines. In practice, these machines are largely antiquated supercomputers that are both a) too old and b) too big for our targeted usecases. On the other hand, this might limit what code we can link against (there's some snarky remark about
std::string
lurking here). It looks like our library compiles with C++20 as-is? It's hard to tell due to the next point.Similarly, we could be using Kokkos 4.0. Most notably, this streamlines the GPU compilation process (which is annoying, and possibly incomprehensible for a non-developer). However, there are some changes I know we need to make to maintain compliance with things that they've broken. The complicating factor is that you might need Kokkos 4.0 to make effective use of C++20 (when you use CUDA), so you can't just use the above and not bump the version of kokkos.
Just some thoughts, wanted to open discussion to anyone interested.
Beta Was this translation helpful? Give feedback.
All reactions