Skip to content

Initial EV3 Support - #925

Open
Caio Rocha (caiocbr) wants to merge 5 commits into
mainfrom
caiorocha/ev3_integration
Open

Caio Rocha (caiocbr) wants to merge 5 commits into
mainfrom
caiorocha/ev3_integration

Conversation

@caiocbr

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI balanced review requested due to automatic review settings October 13, 2026 20:44
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Tiny accepted scales can overflow the precomputed reciprocal and incorrectly dequantize finite nonzero FP8 values to infinity.

3 open findings
What changed in this PR

Adds latency RANK_MAJOR static-scale FP8 support and replay-safe CUDA graph synchronization.

Changes:

  • Propagates static FP8 scales through C++, bindings, and Python APIs.
  • Adds FP8 dispatch/combine kernels and graph-replay rendezvous.
  • Expands validation, documentation, and tests.
File Description
src/​ext/​ep/​latency.cc Validates and propagates quantization scales.
src/​ext/​ep/​include/​moe_runtime_context.hpp Retains scale in dispatch handles.
src/​ext/​ep/​include/​kernels.hpp Adds scale to kernel workloads.
src/​ext/​ep/​dispatch/​rank_major_dispatch.cu Supports FP8 payloads and replay invalidation.
src/​ext/​ep/​dispatch/​common.cuh Selects rank-major FP8 kernels.
src/​ext/​ep/​common/​quantization.cuh Adds scalar FP8 dequantization.
src/​ext/​ep/​combine/​rank_local_reduce_combine.cu Enables FP8 rank-local combine.
src/​ext/​ep/​combine/​direct_send_combine.cu Enables FP8 direct-send combine.
src/​ext/​ep/​combine/​common.cuh Implements FP8 reduction and replay synchronization.
src/​ext/​ep/​bindings.cpp Exposes quantization scale to Python.
python/​test/​test_ep.py Tests FP8 validation, correctness, and replay.
python/​mscclpp/​ep/​utils.py Validates and resolves scalar scales.
python/​mscclpp/​ep/​types.py Extends the public quantization model.
python/​mscclpp/​ep/​request_builder.py Builds FP8 dispatch/combine requests.
python/​mscclpp/​ep/​README.md Documents FP8 and graph replay contracts.
python/​mscclpp/​ep/​communicator.py Updates combine API documentation.
include/​mscclpp/​ext/​ep/​types.hpp Extends the public C++ request API.

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

packed.data[0] = value;
packed.data[1] = value;
const float converted = mscclpp::to<mscclpp::f32x2>(packed).data[0];
return converted == 0.0f ? converted : converted * dequantScale;
Comment on lines +152 to +156
/// Static FP8 quantization multiplier for latency RANK_MAJOR.
///
/// The input is already quantized as E4M3(real * quantScale). Combine
/// dequantizes matching expert output with 1 / quantScale.
float quantScale = 1.0f;
Comment on lines +28 to +30
Latency RANK_MAJOR instead accepts externally quantized FP8 and uses the
scalar multiplier ``scale``: values are stored as E4M3 after multiplication
by ``scale`` and dequantized during combine with ``1 / scale``.
Comment on lines +73 to +77
mscclpp::f8_e4m3x2 packed;
packed.data[0] = value;
packed.data[1] = value;
const float converted = mscclpp::to<mscclpp::f32x2>(packed).data[0];
return converted == 0.0f ? converted : converted * dequantScale;

@Binyang2014 Binyang Li (Binyang2014) Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why not use Vectorization instruction to handle more fp8 data at once

}
}

MSCCLPP_DEVICE_INLINE void invalidateCountsForReplay(const TransportView& transport, int nExperts, int nRanks,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we need this function?

Copilot AI balanced review requested due to automatic review settings October 15, 2026 21:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The benchmark reuses overwritten or stale expert results and rejects supported single-round rank-major graphs.

5 open findings

🧠 Review effort: Balanced

Comment on lines +168 to +169
def combine_fn(dout):
moe.combine(expert_output, dout[1], out=out)
Comment on lines +86 to +87
if args.cuda_graph and latency and args.iters_per_graph < 2:
raise ValueError("MSCCL++ latency graph replay requires --iters-per-graph >= 2 to avoid reusing one epoch")
Copilot AI balanced review requested due to automatic review settings October 15, 2026 22:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Previously reported dequantization overflow and benchmark buffer-reuse correctness issues remain unresolved.

5 open findings

🧠 Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 16, 2026 01:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Benchmark overflow handling can strand MPI peers, and throughput kernel profiling omits required synchronization.

6 open findings
Previously missed (1)

In code that hasn't changed since last review

Medium severity Include peer synchronization in dispatch profiler filtering

python/​mscclpp_benchmark/​ep/​ep_bench_mscclpp.py:17

Match synchronizeThroughputPeersKernel in the dispatch profiler filter. Reused preparation launches this kernel before every throughput dispatch (src/ext/ep/throughput.cc:229–232), but its name contains neither dispatch nor synchronizepeers. Kineto therefore omits the required peer synchronization from dispatch and total kernel timings, overstating performance. Include synchronizethroughputpeers in the matching substrings.

🧠 Review effort: Balanced

Comment on lines +109 to +110
if x.float().abs().max().item() * args.static_fp8_scale > fp8_max:
raise ValueError("--static-fp8-scale overflows the generated activations")
Copilot AI balanced review requested due to automatic review settings October 16, 2026 23:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

output, expertOutput, topkIndices, topkWeights, nTokens, nTopk, nExperts, nRanks, maxTokensPerRank, epoch,
transport, workspaceView, sharedMemory);
transport, workspaceView, sharedMemory,
DispatchType == DispatchDataType::FP8_E4M3 ? 1.0f / workload.quantScale_ : 1.0f);

This branch has not been deployed

No deployments
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.

3 participants