ruiling-smartbear opened a new pull request, #20346:
URL: https://github.com/apache/tvm/pull/20346

   Fixes #20272.
   
   Use a checked 64-bit shape product in both `DeviceMesh` constructors. Reject 
negative dimensions and overflow without narrowing the device count. Validate 
constant Range bounds and cardinality before generating IDs, and avoid 
overflowing the final ID.
   
   Preserve empty-shape and zero-dimension product semantics. This does not 
change duplicate-ID policy.
   
   Validation on Linux CPU / LLVM 16 (`cc0f9f07`, pinned TVM FFI): the original 
code incorrectly accepted 10 invalid-cardinality cases; after this change the 
complete DTensor-type test file reports **25 passed**. Coverage includes both 
constructors, ordinary mismatches, 32/64-bit overflow, negative/zero 
dimensions, nonconstant ranges, and large starting IDs. Large-shape cases use 
empty lists or short ranges, not large allocations.
   
   Changed-file pre-commit checks passed. No GPU tests run.
   
   Generated-by: OpenAI Codex
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to