Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

[WinError 126] The specified module could not be found - Any idea of the error source? #28

Closed
issararab opened this issue Mar 18, 2020 · 1 comment

Comments

@issararab
Copy link

issararab commented Mar 18, 2020

Hi there,

I am trying to replace my LSTM architecture with your interesting QRNN. Following your readme file, everything is installed successfully on my machine. However, while running the example provided, I keep getting this issue. Any idea of the reason?

============================================================

OSError Traceback (most recent call last)
in
8 qrnn = QRNN(hidden_size, hidden_size, num_layers=2, dropout=0.4)
9 qrnn.cuda()
---> 10 output, hidden = qrnn(X)
11
12 print(output.size(), hidden.size())

~\Anaconda3\lib\site-packages\torch\nn\modules\module.py in call(self, *input, **kwargs)
545 result = self._slow_forward(*input, **kwargs)
546 else:
--> 547 result = self.forward(*input, **kwargs)
548 for hook in self._forward_hooks.values():
549 hook_result = hook(self, input, result)

~\Anaconda3\lib\site-packages\torchqrnn\qrnn.py in forward(self, input, hidden)
162
163 for i, layer in enumerate(self.layers):
--> 164 input, hn = layer(input, None if hidden is None else hidden[i])
165 next_hidden.append(hn)
166

~\Anaconda3\lib\site-packages\torch\nn\modules\module.py in call(self, *input, **kwargs)
545 result = self._slow_forward(*input, **kwargs)
546 else:
--> 547 result = self.forward(*input, **kwargs)
548 for hook in self._forward_hooks.values():
549 hook_result = hook(self, input, result)

~\Anaconda3\lib\site-packages\torchqrnn\qrnn.py in forward(self, X, hidden)
97 # Forget Mult
98 # For testing QRNN without ForgetMult CUDA kernel, C = Z * F may be useful
---> 99 C = ForgetMult()(F, Z, hidden, use_cuda=self.use_cuda)
100
101 # Apply (potentially optional) output gate

~\Anaconda3\lib\site-packages\torch\nn\modules\module.py in call(self, *input, **kwargs)
545 result = self._slow_forward(*input, **kwargs)
546 else:
--> 547 result = self.forward(*input, **kwargs)
548 for hook in self._forward_hooks.values():
549 hook_result = hook(self, input, result)

~\Anaconda3\lib\site-packages\torchqrnn\forget_mult.py in forward(self, f, x, hidden_init, use_cuda)
176 ###
177 # Avoiding 'RuntimeError: expected a Variable argument, but got NoneType' when hidden_init is None
--> 178 if hidden_init is None: return GPUForgetMult()(f, x) if use_cuda else CPUForgetMult()(f, x)
179 return GPUForgetMult()(f, x, hidden_init) if use_cuda else CPUForgetMult()(f, x, hidden_init)
180

~\Anaconda3\lib\site-packages\torchqrnn\forget_mult.py in forward(self, f, x, hidden_init)
118
119 def forward(self, f, x, hidden_init=None):
--> 120 self.compile()
121 seq_size, batch_size, hidden_size = f.size()
122 result = f.new(seq_size + 1, batch_size, hidden_size)

~\Anaconda3\lib\site-packages\torchqrnn\forget_mult.py in compile(self)
100 def compile(self):
101 if self.ptx is None:
--> 102 program = Program(kernel.encode(), 'recurrent_forget_mult.cu'.encode())
103 GPUForgetMult.ptx = program.compile()
104

~\Anaconda3\lib\site-packages\pynvrtc\compiler.py in init(self, src, name, headers, include_names, lib_name)
47 headers=[], include_names=[],
48 lib_name=''):
---> 49 self._interface = NVRTCInterface(lib_name)
50 self._program = self._interface.nvrtcCreateProgram(src, name,
51 headers,

~\Anaconda3\lib\site-packages\pynvrtc\interface.py in init(self, lib_path)
85 def init(self, lib_path=''):
86 self._lib = None
---> 87 self._load_nvrtc_lib(lib_path)
88
89 def _load_nvrtc_lib(self, lib_path):

~\Anaconda3\lib\site-packages\pynvrtc\interface.py in _load_nvrtc_lib(self, lib_path)
107 name = lib_path
108
--> 109 self._lib = cdll.LoadLibrary(name)
110
111 self._lib.nvrtcCreateProgram.argtypes = [

~\Anaconda3\lib\ctypes_init_.py in LoadLibrary(self, name)
424
425 def LoadLibrary(self, name):
--> 426 return self._dlltype(name)
427
428 cdll = LibraryLoader(CDLL)

~\Anaconda3\lib\ctypes_init_.py in init(self, name, mode, handle, use_errno, use_last_error)
346
347 if handle is None:
--> 348 self._handle = _dlopen(self._name, mode)
349 else:
350 self._handle = handle

OSError: [WinError 126] The specified module could not be found

@issararab
Copy link
Author

issararab commented Mar 21, 2020

I am using Cuda V10.0 while nvrtc tries to load nvrtc64_94.dll. Solved by changing the default binary file name of pynvrtc to nvrtc64_100_0.dll. Problem Solved!

@issararab issararab changed the title [WinError 126] The specified module could not be found - Can you please help figure out why is the sample code you provided to run QRNN is failing? [WinError 126] The specified module could not be found - Any idea of the error source? Mar 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant