Skip to content

replace context macro usage with inline function calls#13

Merged
gauravharsha merged 3 commits into
mainfrom
fix/context-macro-conflict
May 12, 2026
Merged

replace context macro usage with inline function calls#13
gauravharsha merged 3 commits into
mainfrom
fix/context-macro-conflict

Conversation

@gauravharsha
Copy link
Copy Markdown
Contributor

Update all utils::context. call sites to utils::context(). following the replacement of the context preprocessor macro in green-utils with an inline function. Depends on Green-Phys/green-utils#5, Green-Phys/green-opt#8 and Green-Phys/green-sc#12

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Green-GPU to match the upstream change in green-utils where utils::context moved from a preprocessor macro to an inline function, requiring call sites to use utils::context().….

Changes:

  • Replaced utils::context.… / green::utils::context.… member access with utils::context().… / green::utils::context().… across GPU kernels and tests.
  • Updated MPI communicator/rank accesses (global, global_rank, node_rank, internode_comm, etc.) to route through the new context() accessor.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test/cu_solver_test.cpp Updates context access in HDF5 read gating by node rank.
src/hf_gpu_kernel.cpp Updates MPI barriers/reductions and rank checks to use utils::context().
src/gw_gpu_kernel.cpp Updates MPI barriers/reductions and rank checks to use utils::context().
src/green/gpu/gw_gpu_kernel.h Updates rank check in x2c GW constructor to use utils::context().
src/green/gpu/gpu_kernel.h Updates CUDA/MPI setup paths to use utils::context().
src/gpu_kernel.cpp Updates MPI device communicator setup to use utils::context().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/gpu_kernel.cpp
Comment thread src/gw_gpu_kernel.cpp
Comment thread src/green/gpu/gw_gpu_kernel.h Outdated
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.32%. Comparing base (378e813) to head (8f33618).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #13   +/-   ##
=======================================
  Coverage   95.32%   95.32%           
=======================================
  Files          13       13           
  Lines         877      877           
=======================================
  Hits          836      836           
  Misses         41       41           
Flag Coverage Δ
unittests 95.32% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@gauravharsha gauravharsha merged commit de553fd into main May 12, 2026
1 check passed
@gauravharsha gauravharsha deleted the fix/context-macro-conflict branch May 12, 2026 14:18
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.

4 participants