Summary
broadcast, group_size, and invocation_id are defined as public functions in python/quadrants/lang/simt/subgroup.py but are missing from the module's __all__ list.
Details
The __all__ list at the bottom of subgroup.py (line 172-200) includes all other public functions -- including TODO stubs like broadcast_first, all_true, any_true, all_equal, and shuffle_xor -- but omits these three working implementations:
broadcast(value, index) (line 41) -- implemented, verified on CUDA/AMDGPU/SPIR-V
group_size() (line 45) -- implemented, SPIR-V only
invocation_id() (line 49) -- implemented, verified on CUDA/AMDGPU/SPIR-V
Impact
from quadrants.lang.simt.subgroup import * will not import these three functions. They remain accessible via explicit import or via qd.simt.subgroup.broadcast(), so impact is low, but it is inconsistent.
Suggested fix
Add the three missing names to __all__:
__all__ = [
"barrier",
"memory_barrier",
"elect",
"all_true",
"any_true",
"all_equal",
"broadcast", # <-- add
"broadcast_first",
"group_size", # <-- add
"invocation_id", # <-- add
"reduce_add",
...
]
Found during
Review of #639 (docs for qd.simt.subgroup).
Summary
broadcast,group_size, andinvocation_idare defined as public functions inpython/quadrants/lang/simt/subgroup.pybut are missing from the module's__all__list.Details
The
__all__list at the bottom ofsubgroup.py(line 172-200) includes all other public functions -- including TODO stubs likebroadcast_first,all_true,any_true,all_equal, andshuffle_xor-- but omits these three working implementations:broadcast(value, index)(line 41) -- implemented, verified on CUDA/AMDGPU/SPIR-Vgroup_size()(line 45) -- implemented, SPIR-V onlyinvocation_id()(line 49) -- implemented, verified on CUDA/AMDGPU/SPIR-VImpact
from quadrants.lang.simt.subgroup import *will not import these three functions. They remain accessible via explicit import or viaqd.simt.subgroup.broadcast(), so impact is low, but it is inconsistent.Suggested fix
Add the three missing names to
__all__:Found during
Review of #639 (docs for
qd.simt.subgroup).