def record_stream(self, stream):
        """Record stream for index.

        Parameters
        ----------
        stream : torch.cuda.Stream.
        """
        for index in self._indices:
            if F.context(index) != F.cpu():
                index.record_stream(stream)
Record stream for index.

        Parameters
        ----------
        stream : torch.cuda.Stream.
        
python/dgl/frame.py