Skip to content

Commit

Permalink
No need to check for language. If not supported it should throw an ex…
Browse files Browse the repository at this point in the history
…ception already.
  • Loading branch information
isazi committed Oct 4, 2023
1 parent 0c54c9f commit 9be354e
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions kernel_tuner/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,25 +534,13 @@ def preprocess_gpu_arguments(old_arguments, params):
return _preprocess_gpu_arguments(old_arguments, params)

def copy_shared_memory_args(self, smem_args):
"""adds shared memory arguments to the most recently compiled module, if using CUDA"""
if self.lang == "CUDA":
self.dev.copy_shared_memory_args(smem_args)
else:
raise RuntimeError("Error cannot copy shared memory arguments when language is not CUDA")
self.dev.copy_shared_memory_args(smem_args)

def copy_constant_memory_args(self, cmem_args):
"""adds constant memory arguments to the most recently compiled module, if using CUDA"""
if self.lang == "CUDA":
self.dev.copy_constant_memory_args(cmem_args)
else:
raise RuntimeError("Error cannot copy constant memory arguments when language is not CUDA")

self.dev.copy_constant_memory_args(cmem_args)

def copy_texture_memory_args(self, texmem_args):
"""adds texture memory arguments to the most recently compiled module, if using CUDA"""
if self.lang == "CUDA":
self.dev.copy_texture_memory_args(texmem_args)
else:
raise RuntimeError("Error cannot copy texture memory arguments when language is not CUDA")
self.dev.copy_texture_memory_args(texmem_args)

def create_kernel_instance(self, kernel_source, kernel_options, params, verbose):
"""create kernel instance from kernel source, parameters, problem size, grid divisors, and so on"""
Expand Down

0 comments on commit 9be354e

Please sign in to comment.