Skip to content

CUDA: Reduce memory pressure from local memory tests - #8572

Merged
sklam merged 2 commits into
numba:mainfrom
gmarkall:local-mem-tests-reduce
Nov 7, 2022
Merged

sklam merged 2 commits into
numba:mainfrom
gmarkall:local-mem-tests-reduce

Conversation

@gmarkall

@gmarkall gmarkall commented Nov 2, 2022

Copy link
Copy Markdown
Member

Local memory usage requires a reservation of (bytes per thread) * (number of SMs) * (Max resident threads per SM), which for kernels with local memory requirements of 80KB per thread (as is the case for these tests) forces allocations into the low GBs - this is a problem on the buildfarm as multiple tests run concurrently and can result in out-of-memory conditions.

This commit reduces the local memory allocations by a factor of 10 - I worry that reducing by another order of magnitude might cause local memory not to be allocated in some cases.

Some copy/paste errors that slipped through in these tests are also resolved (including the name of one of the tests!).

Local memory usage requires a reservation of (bytes per thread) *
(number of SMs) * (Max resident threads per SM), which for kernels with
local memory requirements of 80KB per thread (as is the case for these
tests) forces allocations into the low GBs - this is a problem on the
buildfarm as multiple tests run concurrently and can result in
out-of-memory conditions.

This commit reduces the local memory allocations by a factor of 10 - I
worry that reducing by another order of magnitude might cause local
memory not to be allocated in some cases.

Some copy/paste errors that slipped through in these tests are also
resolved (including the name of one of the tests!).
@gmarkall gmarkall added 2 - In Progress CUDA CUDA related issue/PR labels Nov 2, 2022
@gmarkall gmarkall modified the milestone: Numba 0.57 RC Nov 2, 2022
@gmarkall

gmarkall commented Nov 2, 2022

Copy link
Copy Markdown
Member Author

gpuci run tests

@stuartarchibald stuartarchibald left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch. One minor thing to resolve else looks good. The main test of this will be in CI to see if the resource pressure is reduced when the tests are run in a multi-process environment against the same device(s).

Comment thread numba/cuda/tests/cudapy/test_dispatcher.py Outdated
@stuartarchibald stuartarchibald added 4 - Waiting on author Waiting for author to respond to review and removed 3 - Ready for Review labels Nov 4, 2022
@stuartarchibald stuartarchibald added this to the Numba 0.57 RC milestone Nov 4, 2022
@stuartarchibald stuartarchibald self-assigned this Nov 4, 2022
Co-authored-by: stuartarchibald <stuartarchibald@users.noreply.github.com>
@gmarkall

gmarkall commented Nov 4, 2022

Copy link
Copy Markdown
Member Author

gpuci run tests

@gmarkall

gmarkall commented Nov 4, 2022

Copy link
Copy Markdown
Member Author

@stuartarchibald Many thanks for the review, suggestion committed.

@gmarkall gmarkall added 4 - Waiting on reviewer Waiting for reviewer to respond to author and removed 4 - Waiting on author Waiting for author to respond to review labels Nov 4, 2022

@stuartarchibald stuartarchibald left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch and fixes.

@stuartarchibald stuartarchibald added Pending BuildFarm For PRs that have been reviewed but pending a push through our buildfarm 4 - Waiting on CI Review etc done, waiting for CI to finish and removed 4 - Waiting on reviewer Waiting for reviewer to respond to author labels Nov 4, 2022
@esc

esc commented Nov 4, 2022

Copy link
Copy Markdown
Member

Build numba_smoketest_cuda_yaml_170 has started

@stuartarchibald

Copy link
Copy Markdown
Contributor

Build numba_smoketest_cuda_yaml_170 has started

Passed.

@stuartarchibald stuartarchibald added 5 - Ready to merge Review and testing done, is ready to merge BuildFarm Passed For PRs that have been through the buildfarm and passed and removed Pending BuildFarm For PRs that have been reviewed but pending a push through our buildfarm 4 - Waiting on CI Review etc done, waiting for CI to finish labels Nov 7, 2022
@sklam
sklam merged commit 357bc62 into numba:main Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5 - Ready to merge Review and testing done, is ready to merge BuildFarm Passed For PRs that have been through the buildfarm and passed CUDA CUDA related issue/PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants