insilicomedicine / GENTRL

Generative Tensorial Reinforcement Learning (GENTRL) model
596 stars 215 forks source link

RuntimeError: CUDA error: no kernel image is available for execution on the device #32

Open srprd opened 3 years ago

srprd commented 3 years ago

Am getting the runtime error when the cuda device is set to Tesla K40C. CUDA version: 11.0 NVIDIA-Driver version: 450.51.06 Kindly guide me so as to run the scripts given in examples to generate the molecules.

enc = gentrl.RNNEncoder(latent_size=50) dec = gentrl.DilConvDecoder(latent_input_size=50) model = gentrl.GENTRL(enc, dec, 50 * [('c', 20)], [('c', 20)], beta=0.001) model.cuda();

RuntimeError Traceback (most recent call last)

in 2 dec = gentrl.DilConvDecoder(latent_input_size=50) 3 model = gentrl.GENTRL(enc, dec, 50 * [('c', 20)], [('c', 20)], beta=0.001) ----> 4 model.cuda(); ~/anaconda3/envs/myenv/lib/python3.7/site-packages/torch/nn/modules/module.py in cuda(self, device) 461 Module: self 462 """ --> 463 return self._apply(lambda t: t.cuda(device)) 464 465 def cpu(self: T) -> T: ~/anaconda3/envs/myenv/lib/python3.7/site-packages/torch/nn/modules/module.py in _apply(self, fn) 357 def _apply(self, fn): 358 for module in self.children(): --> 359 module._apply(fn) 360 361 def compute_should_use_set_data(tensor, tensor_applied): ~/anaconda3/envs/myenv/lib/python3.7/site-packages/torch/nn/modules/module.py in _apply(self, fn) 357 def _apply(self, fn): 358 for module in self.children(): --> 359 module._apply(fn) 360 361 def compute_should_use_set_data(tensor, tensor_applied): ~/anaconda3/envs/myenv/lib/python3.7/site-packages/torch/nn/modules/rnn.py in _apply(self, fn) 160 self._flat_weights = [(lambda wn: getattr(self, wn) if hasattr(self, wn) else None)(wn) for wn in self._flat_weights_names] 161 # Flattens params (on CUDA) --> 162 self.flatten_parameters() 163 164 return ret ~/anaconda3/envs/myenv/lib/python3.7/site-packages/torch/nn/modules/rnn.py in flatten_parameters(self) 150 self._flat_weights, (4 if self.bias else 2), 151 self.input_size, rnn.get_cudnn_mode(self.mode), self.hidden_size, self.num_layers, --> 152 self.batch_first, bool(self.bidirectional)) 153 154 def _apply(self, fn): RuntimeError: CUDA error: no kernel image is available for execution on the device