Code compatibility between cuda 8.0 and cuda 9.0

Hi, there

I currently ran into a problem below:
THCudaCheck FAIL file=/opt/v0.4.0/aten/src/THC/THCGeneral.cpp line=702 error=48 : no kernel image is available for execution on the device
Traceback (most recent call last):
File “/var/dl/runtime/script/main.py”, line 102, in
train(model, train_loader, eval_loader, args.epochs, args.output, optim, epoch)
File “/var/dl/runtime/script/tesla_test.zip/train.py”, line 94, in train
File “/opt/conda/envs/pytorch-py3.6/lib/python3.6/site-packages/torch/nn/modules/module.py”, line 491, in call
result = self.forward(*input, **kwargs)
File “/var/dl/runtime/script/tesla_test.zip/test_base_model.py”, line 48, in forward
File “/opt/conda/envs/pytorch-py3.6/lib/python3.6/site-packages/torch/nn/modules/module.py”, line 491, in call
result = self.forward(*input, **kwargs)
File “/var/dl/runtime/script/tesla_test.zip/language_model.py”, line 43, in forward
RuntimeError: cuda runtime error (48) : no kernel image is available for execution on the device at /opt/v0.4.0/aten/src/THC/THCGeneral.cpp:702

When the exact same code ran on local, which is cuda 8.0 environment. It can finish without any error.

However, when I ran on platform, which is cuda 9.0. It gave me such error.

I was wondering what is the difference between the program that can run on 8.0 or 9.0. Don’t it use the same api?

I’am here to ask how can I find the changes that needed to be apply to my program so that it is compatible to 9.0

I found the reason.

Other discussion say that compatibility should bigger than 3.0, K20 is 3.5.

I thought that would be ok. However, I guess other factor will affect this.

The result is because of the old GPU. Cuda 8.0 on K20 should do the work.

If your device is cuda 9.0 and you don’t have the permission to degrade this version.

I suggest you change your GPU.