Skip to content

Conversation

@nsarka
Copy link
Member

@nsarka nsarka commented Feb 3, 2026

No description provided.

@nsarka nsarka self-assigned this Feb 3, 2026
@nsarka nsarka force-pushed the nsarka/add-streams-binding branch from c4ba097 to 80a5121 Compare February 3, 2026 19:17
@nsarka
Copy link
Member Author

nsarka commented Feb 3, 2026

!test

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 3, 2026

Greptile Overview

Greptile Summary

Exposes the number_of_streams parameter from the C++ HostIrEvaluatorParams struct to Python through a new property binding on MultiDeviceExecutorParams.

The changes:

  • Add getter/setter property binding for number_of_streams that accesses self.executor.number_of_streams
  • Uses int64_t type matching the C++ implementation
  • Follows the same pattern as the existing use_allocation_cache property

This parameter controls the number of CUDA streams used for communication/computation pipelining in multi-device execution, defaulting to 4 in the C++ code.

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • The change is a straightforward Python binding addition that follows the exact same pattern as the existing use_allocation_cache property. The underlying C++ field exists and is properly typed as int64_t. No logic changes, no new functionality, just exposing an existing parameter to Python.
  • No files require special attention

Important Files Changed

Filename Overview
python/python_direct/multidevice.cpp Added Python binding for number_of_streams parameter to control CUDA stream count for compute/communication pipelining

Sequence Diagram

sequenceDiagram
    participant Python as Python Code
    participant Binding as multidevice.cpp
    participant Params as MultiDeviceExecutorParams
    participant Executor as HostIrEvaluatorParams
    
    Note over Python,Executor: Setting number_of_streams
    Python->>Binding: params.number_of_streams = value
    Binding->>Params: Access self.executor
    Params->>Executor: Set number_of_streams field
    
    Note over Python,Executor: Getting number_of_streams
    Python->>Binding: value = params.number_of_streams
    Binding->>Params: Access self.executor
    Params->>Executor: Read number_of_streams field
    Executor-->>Binding: Return int64_t value
    Binding-->>Python: Return value
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

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