-
Notifications
You must be signed in to change notification settings - Fork 157
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
refactor: VecMem-ification of the Sycl Seedfinder Plugin #998
refactor: VecMem-ification of the Sycl Seedfinder Plugin #998
Conversation
So one thing that we would have to figure out is how to handle the vecmem dependency. We had decided a long(ish) while ago that we would bundle and ship the dependency code. We do this for a number of libraries. However, we recently introduced convenience helpers similar to this PR's I'm a bit torn, honestly, how we should go about this. Ideally I would think we should handle this as consistently as possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know, I know... I should've looked in this detail already earlier... 😦 My comments are really just surface level though... 😉
Plugins/Sycl/include/Acts/Plugins/Sycl/Seeding/CreateSeedsForGroupSycl.hpp
Show resolved
Hide resolved
I personally like the |
Indeed, shocker! Maybe we can discuss how to go about handling thirdparty modules in next week's ACTS core meeting? |
Apart from a single comment (removing all changes from |
Whether Acts would build VecMem itself is now controlled by the ACTS_USE_SYSTEM_VECMEM configuration option, and the build configuration has been moved to the thirdparty/vecmem subdirectory. The build of VecMem is always set up, however its libraries are only built if some other part of Acts is actually using them.
At the same time removing the "optnone" flag from the main function of the seed finding.
Codecov Report
@@ Coverage Diff @@
## main #998 +/- ##
=======================================
Coverage 48.60% 48.60%
=======================================
Files 337 337
Lines 17329 17329
Branches 8191 8191
=======================================
Hits 8423 8423
Misses 3165 3165
Partials 5741 5741 Continue to review full report at Codecov.
|
At the same time removed the EXCLUDE_FROM_ALL flag from add_subdirectory(...), to make sure that the VecMem libraries would be installed together with Acts when Acts builds VecMem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is as good as it's going to get...
@paulgessinger, I had to realise that the way that we've been building VecMem as part of Acts (and as part of all of the other projects...) so far was quite wrong. Since if we use add_subdirectory(...) with the EXCLUDE_FROM_ALL
flag, the code from the subdirectory would not become part of the project's installation. I.e. the main VecMem libraries are not installed together with the project (with make install
). Since all of the other projects (detray and traccc) we're only using "from their build directories" so far, this never showed up. 🤔
So now I ditched the usage of EXCLUDE_FROM_ALL
, and switched to using FetchContent_MakeAvailable(...)
instead. We will need to re-think how the R&D projects use each other as well...
@konradkusiak97, note that I just now found that the __attribute__(noopt)
setting was still active in the PR. I now removed that. It may actually speed up some of your tests! 😉
The current implementation of the Sycl Seedfinder uses pointers to manage memory allocations on the host and on the device. This PR changes this approach by implementing VecMem for memory management.
Under the supervision of @krasznaa, I updated the code so that it works fully on VecMem objects. A short summary of the changes is the following:
CreateSeedsForGroupSycl()
all the host and device objects are nowvecmem::vector(s)
orvecmem::data::vector_buffer(s)
. They are received in the kernels asvecmem::data::vector_view(s)
and manipulated there asvecmem::device_vector(s)
.vecmem::jagged_vector
was used for the Duplet finding and as a result, the atomic count was removed from theDupletSearch
kernels.CreateSeedsForGroupSycl.cpp
.TripletSearch
andTripletFinding
kernels were moved to separate files and rewritten as function objects.