[WIP][EP] Make uccl.ep a self-contained Python subpackage (.so + Python code)#888
[WIP][EP] Make uccl.ep a self-contained Python subpackage (.so + Python code)#888zhenhuang12 wants to merge 1 commit into
Conversation
7fa4c37 to
217c5fd
Compare
|
There seems to be some conflict, cc @zhenhuang12 |
f056922 to
9f26d95
Compare
@YangZhou1997 Thanks! I'm continuing to support this feature—the build changes are fairly large and I'd appreciate a review. I've moved the compilation of cc @MaoZiming |
9a87824 to
9bae94c
Compare
|
@zhenhuang12 is it possible to avoid using a Makefile, which is usually less maintainable than a shell script like build_inner.sh? |
@YangZhou1997 I think we could replace the Makefile with a Do you think using build.sh instead of Makefile is a better approach? I'd like to hear your opinion. |
|
@YangZhou1997 If you think the current PR change is too large, I can revert it and only keep the "ep python self-containerd" part. Support for |
|
Hi @zhenhuang12, the PR size is okay for me. I think if we can use a ShellExtension in the setup.py, that would be better, so that we can keep all building functions in the existing |
ec2f48a to
1d2eb72
Compare
Description
Turns
uccl.epinto a self-contained Python subpackage: the native extension (ep_cpp.abi3.so, renamed from the old top-levelep.abi3.soso it no longer collides with theuccl.eppackage name) now lives alongside the Python helpers (Buffer,EventOverlap,initialize_uccl,destroy_uccl, …) underuccl/ep/. The Python source of truth moves toep/python/uccl_ep/and is exposed viapackage_dir={"uccl.ep": "ep/python/uccl_ep"}.ep/bench/{buffer,utils}.pyandep/deep_ep_wrapper/deep_ep/are reduced to thinre-export shims over
uccl.ep, so existing bench scripts anddeep_epimports keep working. After this changepip install ucclis enough toimport uccl.epand use the full Python API.Important
deep_ep_wrapperno longer needs to be reinstalled when theuccl.epnative library changes.Previously
deep_ep_wrappershipped its own full copy ofbuffer.py/utils.pythat called into the native extension directly, so any change to theuccl.epdynamic-library API (symbol rename, signature change, new helper, …) required rebuilding and reinstallingdeep_ep_wrapperto stay in sync. With this PR,deep_ep_wrappercontains no implementation of its own — it simply re-exports fromuccl.epat import time. Upgradingucclalone is sufficient; the existingdeep_ep_wrapperinstall picks up the new API automatically as long as the public names it re-exports remain stable.Not a behavior change
Only packaging / module layout is changing. The native C++/CUDA code, the Python
Bufferclass,initialize_uccl/destroy_uccl, benchmark scripts, and CI workflows all keep the same public semantics.Fixes # (issue)
Type of Change
How Has This Been Tested?
Checklist
format.shto follow the style guidelines.build.shto verify compilation.