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

[arcane, accelerator] Use malloc for allocating nvidia GPU memory #1576

Merged

Conversation

cedricchevalier19
Copy link
Member

To exploit ATS on Nvidia Grace-Hopper or HMM-enabled computers.

This PR adds a new ARCANE_CUDA_ALLOC_ATS cmake option, that is disabled by default.

We kept all the prefetch machinery, but most of it should be removed as there is no any more data "migration."
We do not use cudaMemAdvise_v2 to choose memory placement, letting the system do it. If page migration is not enabled, it can lead to performance penalties as the data location is chosen through a first-touch policy.

Copy link

codecov bot commented Aug 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.66%. Comparing base (a9a09e3) to head (0fa2411).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1576      +/-   ##
==========================================
- Coverage   69.66%   69.66%   -0.01%     
==========================================
  Files        2247     2247              
  Lines      160512   160512              
  Branches    18493    18493              
==========================================
- Hits       111825   111817       -8     
- Misses      42021    42027       +6     
- Partials     6666     6668       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@grospelliergilles
Copy link
Member

Thansk for the PR.

I think it is better to use an environment variable to activate this allocator instead of compilation flag. This will allow us to dynamically change the allocator without recompiling (see class CommonUnifiedMemoryAllocatorWrapper in this file as an example).

@grospelliergilles grospelliergilles merged commit 7cd6095 into arcaneframework:main Oct 2, 2024
27 checks passed
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