Hi David!



 david.bernstein:

which I do with the openCV connectedComponents function. However I was wondering if there is a pytorch equivalent so I can do this operation while the tensor is still on the GPU.


I don’t know one way or the other whether there is a pytorch / gpu
connected-components function.  (I sort of doubt it.)  But, in any
event, a connected-components algorithm would be unlikely to
benefit much from a gpu’s pipelined architecture.
I suppose that if after constructing the connected components
you needed to move the result back to the gpu, avoiding the
gpu-cpu-gpu memory transfers could be a benefit of running
connected components on the gpu.
Best.
K. Frank