Skip to content

RuntimeError: CudaError: device-side assert triggered #1

@Vinit-source

Description

@Vinit-source

Hi. I tried running the code in this repo on google colab. I get the following CUDAError everytime I run the code.
Screenshot (23)
Screenshot (25)
I have set CUDA_LAUNCH_BLOCKING flag to 1 referring to the stackoverflow solutions but the same traceback is returned. The traceback shows problems in the inference_step. Please help.

This is my code:
from google.colab import drive
from os import path
if not path.exists('/content/drive'):
drive.mount('/content/drive')
!apt-get update
!apt-get install python3.8
!apt-get install python3.8-dev
!wget https://bootstrap.pypa.io/get-pip.py && python3.8 get-pip.py
import sys
sys.path[2] = '/usr/lib/python38.zip'
sys.path[3] = '/usr/lib/python3.8'
sys.path[4] = '/usr/lib/python3.8/lib-dynload'
sys.path[5] = '/usr/local/lib/python3.8/dist-packages'
sys.path[7] ='/usr/local/lib/python3.8/dist-packages/IPython/extensions'
import os
os.environ['CUDA_LAUNCH_BLOCKING']="1"
!python3.8 -m pip install -r requirements.txt #This returns an error -- ignore
!pip install -r /my/project/directory/attend-infer-repeat-pytorch/requirements.txt
#Restart runtime after executing the above code
#Create another code cell
%cd /my/project/directory/attend-infer-repeat-pytorch
#import os
os.environ['CUDA_LAUNCH_BLOCKING']="1"
!CUDA_LAUNCH_BLOCKING=1 python3.8 main.py

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions