garyfeng / Global-Flow-Local-Attention

The source code for paper "Deep Image Spatial Transformation for Person Image Generation"
https://renyurui.github.io/GFLA-web
Other
1 stars 0 forks source link

Fixing a bug with Touch CUDA version #1

Open garyfeng opened 3 years ago

garyfeng commented 3 years ago

If you run the original notebook on CoLab, you likely will encounter the following bug

RuntimeError: cuda runtime error (11) : invalid argument at /pytorch/aten/src/THC/generic/THCTensorMathPairwise.cu:225

There are likely two sources of errors, both resulting from the fact that Google CoLab is giving me a Tesla T4 GPU instance with CUDA 10.1.

Specifically, find the setup.py files under each model/networkd/* folder, and add the following:

  #'-gencode', 'arch=compute_70,code=compute_70',
    '-gencode', 'arch=compute_75,code=sm_75',
    '-gencode', 'arch=compute_75,code=compute_75'

This will add the support for Tesla T4 while also supporting previous versions.

garyfeng commented 3 years ago
!wget https://download.pytorch.org/whl/cu100/torch-1.0.0-cp36-cp36m-linux_x86_64.whl
!pip uninstall torch
!pip install torch-1.0.0-cp36-cp36m-linux_x86_64.whl