- 
                Notifications
    
You must be signed in to change notification settings  - Fork 490
 
UCT/GDA/TEST: Add runtime config for device debug logs #10917
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
base: master
Are you sure you want to change the base?
UCT/GDA/TEST: Add runtime config for device debug logs #10917
Conversation
8fceb3f    to
    faa224f      
    Compare
  
    faa224f    to
    89ca917      
    Compare
  
    | ucp_device_request_t &req = request_mgr.get_request(); | ||
| status = ucp_perf_cuda_send_nbx<level, cmd>(params, idx, req); | ||
| if (status != UCS_OK) { | ||
| ucs_device_error("send failed: %d", status); | 
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.
can we keep error macro for convinience?
| const char *basename = path; | ||
| const char *p; | ||
| 
               | 
          ||
| for (p = path; *p != '\0'; p++) { | ||
| if (*p == '/') { | ||
| basename = p + 1; | ||
| } | ||
| } | ||
| 
               | 
          ||
| return basename; | 
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.
Maybe use standard lib:
| const char *basename = path; | |
| const char *p; | |
| for (p = path; *p != '\0'; p++) { | |
| if (*p == '/') { | |
| basename = p + 1; | |
| } | |
| } | |
| return basename; | |
| const char *basename = strrchr(path, '/'); | |
| return basename ? basename + 1 : path; | 
| 
               | 
          ||
| UCS_F_DEVICE const char *ucs_device_log_source_file(const char *file) | ||
| { | ||
| static const char *cached_source_file = NULL; | 
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'm not sure if this caching is always safe
What happens if translation unit includes a header file which contains a logger call?
Which FILE will be cached?
| 
               | 
          ||
| 
               | 
          ||
| /* | ||
| * Read a 64-bit atomic value from a global memory address. | 
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.
please align all docs in this file
| * See file LICENSE for terms. | ||
| */ | ||
| 
               | 
          ||
| #ifndef UCS_STUB_DEVICE_CUH | 
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.
UCS_STUB_DEVICE_H maybe?
No description provided.