Cuda error 45: no kernel image - Pytorch 0.3.1.post2

OK, I also have only 2 GB ram. Are you on Pascal notebook, if you are only halfway then you may not have got to the section where the last 3 layers of the model are unfrozen. I had to reduce batch size to work with that - I picked 32 (half of 64), and it was OK, I had to increase the number of cycles to get anything near to what Jeremy was showing, but even then the accuracy was really bad…

I cannot speak for this. I don’t think a GPU will affect the accuracy a lot, it is more about the speed. However, batch size did play a role in accuracy due to Batch Normalization, where performance start to become unstable when batch size was too small. But in your case Batch Size is still 32, which should be fine.

Did you get similiar performence compare to Jeremy’s notebook before you reach the part that you have to change batch size?

If you decrease the batch size 2x you’ll need to re-run the LR finder.

Hi Nok and chris,
I am in the same trouble as that of chris, I have updated the conda as a result pytorch has been updated to 0.3.1.post2 . I tried installing wheel from peterjc123 from here, but unable to install it through pip.
It gives me error,
(fastai) C:\Users\Mahesh.Bhosale\Downloads>pip install “torch-0.3.0b0+591e73e-cp36-cp36m-win_amd64 (1).whl”
torch-0.3.0b0+591e73e-cp36-cp36m-win_amd64 (1).whl is not a supported wheel on this platform.

Though my GPU is Quadro M1200 which is of Maxwell architecture.

Any help is much appreciated.

Hi, Maxwell should be supported, just make sure you select the correct wheel. Do you have Win10 as your OS, since your wheel file looks like a Win10, python3.6 and Maxwell wheel file.

Thanks Jeremy

I’ll insert that step and try again.

What is the best strategy - begin with the batch size that you’ll eventually need, or adjust down to it as required?

Did you choose a wheel appropriate to your version of visual studio (2015 or 2017)?

Yes, performance was similar - Jeremy has indicated that I need to re-establish the learning rate - so when I get home tonight I’ll incorporate that and see where it leads me.

Hi nok, yes my OS is Windows10. Below is system information.

|OS Name|Microsoft Windows 10 Enterprise|
|Version|10.0.15063 Build 15063|
|Other OS Description |Not Available|
|OS Manufacturer|Microsoft Corporation|
|System Type|x64-based PC|
|System SKU|LENOVO_MT_20HJ_BU_Think_FM_ThinkPad P51|
|Processor|Intel® Core™ i7-7820HQ CPU @ 2.90GHz, 2904 Mhz, 4 Core(s), 8 Logical Processor(s)|

But one point worth noting is, I have intel proocessor but wheel file has “amd” at last, would that make any difference?

I believe visual studio is needed for compiling from the source, as we have compiled binaries and packaged .whl, is visual studio needed while installing these as well? If yes, I wonder why would that be a possible case?

Though I do see README of peterjc123 mentions,

APPVEYOR_BUILD_WORKER_IMAGE : VS 2015/2017 This does not indicate the compiler it used, but the system it can run on. The former one can be used on Windows 7/8/8.1 and Windows Server 2008/2012, while the latter on Windows 10 and Windows Server 2016.

I don’t know for sure that VS is needed. I do have VS 2015 so used the .whl that matched that. My other ingredients are similar to yours, Windows 10, Python 3.6, Intel i7 (the ‘amd’ is not indicative of CPU I think), and my architecture is Keplar (oldest supported architecture :slight_smile:).

Perhaps its worthwhile to install a minimal free VS 2017 version and try again?

As suggested from this thread. Please check whether your have the right Python( 3.6, 64-bit). Make sure you have python3.6 instead of 3.5. Google around “wheel not supported on this platform” may helps, it does not look like a PyTorch specific error.

I think you will need to install VS only if you want to compile it from source yourself. I didn’t install them.

Good to know that nok - thanks for the clarification!

Thanks Chris. I will see check if installing Visual studio solves my problem.

Thanks nok, and chris.
I managed to install the pytorch,

(fastai) C:\Users\Mahesh.Bhosale\fastai>pip install “C:\Users\Mahesh.Bhosale\Downloads\torch-0.3.0b0+591e73e-cp36-cp36m-win_amd64.whl”
Processing c:\users\mahesh.bhosale\downloads\torch-0.3.0b0+591e73e-cp36-cp36m-win_amd64.whl
Requirement already satisfied: pyyaml in c:\users\mahesh.bhosale\appdata\local\continuum\anaconda3\envs\fastai\lib\site-packages (from torch==0.3.0b0+591e73e)
Requirement already satisfied: numpy in c:\users\mahesh.bhosale\appdata\local\continuum\anaconda3\envs\fastai\lib\site-packages (from torch==0.3.0b0+591e73e)
Installing collected packages: torch
Found existing installation: torch 0.3.1.post2
Uninstalling torch-0.3.1.post2:
Successfully uninstalled torch-0.3.1.post2
Successfully installed torch-0.3.0b0+591e73e

But when I import torch, it gives me error.

(fastai) C:\Users\Mahesh.Bhosale\fastai>python
Python 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Mahesh.Bhosale\AppData\Local\Continuum\anaconda3\envs\fastai\lib\site-packages\torch\__init__.py", line 76, in <module>
    from torch._C import *
ImportError: DLL load failed: The specified module could not be found.

I think , I should now check installing the VS 2017, if that helps somehow magically :slight_smile:

Does it have any further information about the specified module?

Nope, thats what I all got an error. I think this is where it has got some errors while importing.

from torch._C import *

Sorry, been at work and then with family…

Crashing out at from torch._C import * seems a common occurrence when something is missing in the supporting system. Have you tried it from within a notebook - do you get any more information? Can you debug into it? Did yo try installing VS2017?

Within the notebook, it gives me the same error. I will try out with installing VS2017 and will update once done.

Thanks!