Skip to content

Conversation

eddy16112
Copy link
Contributor

No description provided.

@eddy16112 eddy16112 requested review from apryakhin and muraj October 9, 2025 21:56
@eddy16112 eddy16112 self-assigned this Oct 9, 2025
Copy link

codecov bot commented Oct 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 27.15%. Comparing base (ade8156) to head (84e5f03).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff            @@
##             main     #332    +/-   ##
========================================
  Coverage   27.15%   27.15%            
========================================
  Files         190      190            
  Lines       39174    39174            
  Branches    14289    14359    +70     
========================================
  Hits        10638    10638            
- Misses      27681    28144   +463     
+ Partials      855      392   -463     

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

atomic<size_t> cudaipc_responses_received{0};
int cuda_api_version = 0;

CudaHook *cuda_hook{nullptr};
Copy link
Contributor

Choose a reason for hiding this comment

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

Please do not add CudaHook to the cuda module, since everything here is public and accessible to applications. We actually need to move some of these things in here to some internal structure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree with you. Before we have an internal module structure, we will either put it here or move it into the .cc and declare it as a static variable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I declared it as static variable inside cuda_module.cc

cupti_api_initialized = true;
}
if (config->cfg_enable_cuhook && CUPTI_HAS_FNPTR(cuptiSubscribe)) {
cuda_hook = new CudaHook();
Copy link
Contributor

Choose a reason for hiding this comment

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

Why does this have to be a separate object?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it will be cleaner to pack all cu hook related variables and functions into a class.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just do not like floating functions and variables, but you prefer not put them into a class, I am OK removing it.

@@ -1,3 +1,4 @@

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we instead just delete this file entirely? Why does this need to be separate from cuda_module or cuda_internal.cc?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The cuda hook is a separate feature, so I think it is better to put it into a different file. The cuda_module and cuda_internal are already over 2000 lines. IMHO, we should divided them into something like cuda_memory.cc, cuda_channel.cc and etc.

@eddy16112 eddy16112 requested a review from muraj October 15, 2025 21:11
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