Skip to content

Conversation

@wujingyue
Copy link
Collaborator

  • Convert local includes in multidevice tests to quote style
  • Reorder include blocks to match Google C++ include ordering
  • Add blank lines between third-party include groups and drop unused torch include

@wujingyue wujingyue requested a review from naoyam January 2, 2026 06:58
@wujingyue
Copy link
Collaborator Author

!test

@github-actions
Copy link

github-actions bot commented Jan 2, 2026

Review updated until commit 49d1c02

Description

  • Convert local includes in multidevice test files from angle-bracket to quote style

  • Reorder include statements following Google C++ include ordering conventions

  • Move project-specific header includes to top of include blocks

  • Remove duplicate includes and standardize include formatting across 18 test files

Changes walkthrough

Relevant files
Enhancement
18 files
multidevice.cpp
Convert includes to quote style and reorder                           
+12/-11 
multidevice_transformer.cpp
Convert includes and remove duplicate header                         
+8/-7     
test_multidevice_communications.cpp
Reorder and convert includes to quote style                           
+14/-14 
test_multidevice_communicator.cpp
Convert includes to quote style                                                   
+2/-2     
test_multidevice_host_ir.cpp
Convert includes to quote style                                                   
+8/-8     
test_multidevice_host_ir_overlap.cpp
Convert includes to quote style                                                   
+8/-8     
test_multidevice_ipc.cpp
Reorder and convert includes to quote style                           
+9/-8     
test_multidevice_lower_communication.cpp
Reorder and convert includes to quote style                           
+10/-11 
test_multidevice_lower_communication_cuda.cpp
Reorder and convert includes to quote style                           
+13/-13 
test_multidevice_matmul.cpp
Convert includes to quote style                                                   
+16/-16 
test_multidevice_pipeline.cpp
Reorder and convert includes to quote style                           
+30/-32 
test_multidevice_sharding.cpp
Convert includes to quote style                                                   
+8/-8     
test_multidevice_stream_parallel_type.cpp
Convert includes to quote style                                                   
+11/-11 
test_multidevice_symmetric_tensor.cpp
Convert includes to quote style                                                   
+2/-2     
test_multidevice_transformer.cpp
Convert includes to quote style                                                   
+6/-6     
test_multidevice_tutorial.cpp
Convert includes to quote style                                                   
+8/-8     
multidevice.h
Convert includes to quote style                                                   
+6/-6     
multidevice_transformer.h
Convert includes to quote style                                                   
+1/-1     

PR Reviewer Guide

Here are some key observations to aid the review process:

🧪 PR contains tests
⚡ No major issues detected

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 2, 2026

Greptile Summary

This PR performs a comprehensive code style cleanup across 18 multidevice test files by reordering includes to match Google C++ style guide and converting local includes from angle bracket syntax to quote syntax. The changes include:

  • Converting all local/project includes from <path> to "path" syntax across all 18 files
  • Reordering includes in each file to follow Google C++ conventions: standard library → third-party → local project includes
  • Adding blank lines between include groups for improved readability
  • Removing unused includes (e.g., unused torch headers in some files)

All changes are purely stylistic with zero functional impact. The PR correctly implements the include ordering standard where:

  1. Standard library headers come first (<algorithm>, <iostream>, etc.)
  2. Third-party headers follow (<gtest/gtest.h>, <torch/...>, etc.)
  3. Local project headers last, using quote syntax ("fusion.h", "multidevice/...h", etc.)

The refactoring improves code consistency and makes the codebase easier to navigate by establishing a uniform include style across all multidevice test files.

Confidence Score: 5/5

  • This PR is safe to merge with no functional risk - it contains only stylistic include ordering changes with no impact on code behavior.
  • Score of 5 reflects that this is a purely stylistic refactoring with zero functional changes. All 18 files have been consistently updated to follow Google C++ include ordering guidelines. The changes are straightforward include reordering and syntax conversion (angle brackets to quotes for local includes). There is no risk of introducing bugs, breaking tests, or affecting runtime behavior. The include pattern is correct and consistent across all modified files.
  • No files require special attention. All changes are consistent stylistic improvements with no functional impact.

Important Files Changed

Filename Overview
tests/cpp/multidevice.h Converted local includes from angle brackets to quotes and reordered to match Google C++ style guide with blank lines between groups.
tests/cpp/multidevice.cpp Reordered includes to Google C++ style (header first, then std lib, third-party, local), converted to quote syntax for local includes, removed unused torch include.
tests/cpp/test_multidevice_pipeline.cpp Reordered includes to Google C++ style with proper grouping (std lib, third-party, local), converted local includes to quote syntax.
tests/cpp/test_multidevice_matmul.cpp Converted local includes from angle brackets to quotes, proper grouping of third-party and local includes with blank line separation.
tests/cpp/test_multidevice_communications.cpp Converted local includes to quote syntax, reordered with proper blank line separation between standard, third-party, and local includes.

Sequence Diagram

sequenceDiagram
    participant Compiler
    participant StdLib as "Standard Library"
    participant ThirdParty as "Third-Party"
    participant Local as "Local Project"
    
    Compiler->>StdLib: "Search includes first"
    StdLib-->>Compiler: "Found"
    Compiler->>ThirdParty: "Then search third-party"
    ThirdParty-->>Compiler: "Found"
    Compiler->>Local: "Finally search local"
    Local-->>Compiler: "Found"
    Note over Compiler,Local: "Google C++ Include Order Pattern"

Loading

@wujingyue wujingyue changed the title Reorder multidevice test includes Convert local includes in multidevice tests to quote style Jan 5, 2026
@wujingyue
Copy link
Collaborator Author

!test

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