Demo entry 6881435

Python Async

   

Submitted by anonymous on Sep 10, 2019 at 21:21
Language: Python 3. Code size: 144 Bytes.

import torch


def main():
    t = torch.Tensor([42])
    cuda_t = t.cuda(async=True)
    print(cuda_t)


if __name__ == "__main__":
    main()

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).