microsoft/mscclpp

[Feature] `deviceHandle()` interface is counter-intuitive

chhwang opened this issue · 0 comments

Host2DeviceSemaphore::deviceHandle() and SmDevice2DeviceSemaphore::deviceHandle() interfaces look like for retrieving properties of the class object, suggesting usage such as:

SmDevice2DeviceSemaphore sem(communicator, connection);
auto handle = sem.deviceHandle();

But this a case of illegal usage as we need to call communicator.setup() in between the object construction and the call to deviceHandle() method. We may need to either call the setup() internally or make the internal sendMemoryOnSetup() and recvMemoryOnSetup() calls to be more explicit.