Skip to content

Use thread adoption to handle log messages. #2754

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

Merged
merged 1 commit into from
Apr 23, 2025
Merged

Use thread adoption to handle log messages. #2754

merged 1 commit into from
Apr 23, 2025

Conversation

maleadt
Copy link
Member

@maleadt maleadt commented Apr 22, 2025

No description provided.

@maleadt maleadt mentioned this pull request Apr 22, 2025
Copy link
Contributor

Your PR requires formatting changes to meet the project's style guidelines.
Please consider running Runic (git runic master) to apply these changes.

Click here to view the suggested changes.
diff --git a/lib/cublas/CUBLAS.jl b/lib/cublas/CUBLAS.jl
index 4093bac89..55dd7e30f 100644
--- a/lib/cublas/CUBLAS.jl
+++ b/lib/cublas/CUBLAS.jl
@@ -238,7 +238,7 @@ function flush_log_messages()
     code = message[1]
     lines = split(message[3:end], r"\n+[a-z]!")
     message = join(strip.(lines), '\n')
-    if code == 'I'
+    return if code == 'I'
         @debug message
     elseif code == 'W'
         @warn message
@@ -261,7 +261,7 @@ function __init__()
 
     # register a log callback
     if !Sys.iswindows() && # NVIDIA bug #3321130 &&
-       !precompiling && (isdebug(:init, CUBLAS) || Base.JLOptions().debug_level >= 2)
+            !precompiling && (isdebug(:init, CUBLAS) || Base.JLOptions().debug_level >= 2)
         callback = @cfunction(log_message, Nothing, (Cstring,))
         cublasSetLoggerCallback(callback)
         atexit(flush_log_messages)

Copy link

codecov bot commented Apr 22, 2025

Codecov Report

Attention: Patch coverage is 20.00000% with 20 lines in your changes missing coverage. Please review.

Project coverage is 89.35%. Comparing base (59da6c9) to head (10dc2e0).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
lib/cublas/CUBLAS.jl 22.72% 17 Missing ⚠️
lib/cudnn/src/cuDNN.jl 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2754      +/-   ##
==========================================
+ Coverage   89.03%   89.35%   +0.32%     
==========================================
  Files         153      153              
  Lines       13172    13148      -24     
==========================================
+ Hits        11728    11749      +21     
+ Misses       1444     1399      -45     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@maleadt maleadt merged commit a3d6aa4 into master Apr 23, 2025
3 checks passed
@maleadt maleadt deleted the tb/log_threads branch April 23, 2025 10:28
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.

1 participant