zoukankan      html  css  js  c++  java
  • CUDA error: device-side assert triggered

    运行时出现下面的错误:

    C:/cb/pytorch_1000000000000/work/aten/src/ATen/native/cuda/IndexKernel.cu:142: block: [0,0,0], thread: [17,0,0] Assertion `index >= -sizes[i] && index < sizes[i] && "index out of bounds"` failed.
    C:/cb/pytorch_1000000000000/work/aten/src/ATen/native/cuda/IndexKernel.cu:142: block: [0,0,0], thread: [61,0,0] Assertion `index >= -sizes[i] && index < sizes[i] && "index out of bounds"` failed.
    C:/cb/pytorch_1000000000000/work/aten/src/ATen/native/cuda/IndexKernel.cu:142: block: [0,0,0], thread: [62,0,0] Assertion `index >= -sizes[i] && index < sizes[i] && "index out of bounds"` failed.
    C:/cb/pytorch_1000000000000/work/aten/src/ATen/native/cuda/IndexKernel.cu:142: block: [0,0,0], thread: [63,0,0] Assertion `index >= -sizes[i] && index < sizes[i] && "index out of bounds"` failed.
    ...
    RuntimeError: CUDA error: device-side assert triggered

    这是因为Tensor下标越界,造成CUDA断言错误,不让下标越界就正常了.

  • 相关阅读:
    NSString拼接字符串
    2020/4/26
    2020/4/25
    2020/4/24
    2020/4/22
    2020/4/22
    2020/4/20
    2020/4/19
    2020/4/18
    2020/4/17
  • 原文地址:https://www.cnblogs.com/mstk/p/14724470.html
Copyright © 2011-2022 走看看