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

Threading fixes #734

Merged
merged 4 commits into from
Feb 25, 2021
Merged

Threading fixes #734

merged 4 commits into from
Feb 25, 2021

Conversation

maleadt
Copy link
Member

@maleadt maleadt commented Feb 23, 2021

Fixes #706

@maleadt maleadt added the bugfix This gets something working again. label Feb 23, 2021
@maleadt maleadt mentioned this pull request Feb 23, 2021
@codecov
Copy link

codecov bot commented Feb 24, 2021

Codecov Report

Merging #734 (ec6ce32) into master (c6bfe1d) will increase coverage by 13.38%.
The diff coverage is 75.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #734       +/-   ##
===========================================
+ Coverage   65.35%   78.74%   +13.38%     
===========================================
  Files         123      124        +1     
  Lines        7427     7466       +39     
===========================================
+ Hits         4854     5879     +1025     
+ Misses       2573     1587      -986     
Impacted Files Coverage Δ
lib/cudadrv/context.jl 89.04% <ø> (ø)
src/pool/utils.jl 57.69% <0.00%> (+1.69%) ⬆️
src/state.jl 87.00% <ø> (+6.59%) ⬆️
lib/cudadrv/stream.jl 81.25% <75.00%> (+1.25%) ⬆️
lib/curand/CURAND.jl 98.41% <100.00%> (+1.69%) ⬆️
examples/wmma/high-level.jl 11.11% <0.00%> (-88.89%) ⬇️
examples/wmma/low-level.jl 14.28% <0.00%> (-85.72%) ⬇️
src/compiler/exceptions.jl 94.44% <0.00%> (-5.56%) ⬇️
lib/cufft/fft.jl 85.03% <0.00%> (-3.85%) ⬇️
lib/cufft/error.jl 27.27% <0.00%> (-2.73%) ⬇️
... and 39 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c6bfe1d...7f8aae9. Read the comment docs.

@norci
Copy link
Contributor

norci commented Feb 24, 2021

This fix works. Great!

btw, there is a undefined variable pool_name .
I guess there's no unit test for memory_status :)

diff --git a/src/pool.jl b/src/pool.jl
index fbb239d9..b3aabb8f 100644
--- a/src/pool.jl
+++ b/src/pool.jl
@@ -584,6 +584,10 @@ function memory_status(io::IO=stdout)
   alloc_used_bytes = used_memory()
   alloc_cached_bytes = cached_memory()
   alloc_total_bytes = alloc_used_bytes + alloc_cached_bytes
+
+  default_pool = version() >= v"11.2" ? "cuda" : "binned"
+  pool_name = get(ENV, "JULIA_CUDA_MEMORY_POOL", default_pool)
+
   @printf(io, "%s usage: %s (%s allocated, %s cached)\n", pool_name,
               Base.format_bytes(alloc_total_bytes), Base.format_bytes(alloc_used_bytes),
               Base.format_bytes(alloc_cached_bytes))

@maleadt
Copy link
Member Author

maleadt commented Feb 25, 2021

btw, there is a undefined variable pool_name .
I guess there's no unit test for memory_status :)

Thanks, fixed!

@maleadt maleadt merged commit ac1f52f into master Feb 25, 2021
@maleadt maleadt deleted the tb/threading branch February 25, 2021 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This gets something working again.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deadlock during OOM
3 participants