Skip to content

Commit

Permalink
Back to shared_mem_size_bytes from kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
giadarol committed Nov 10, 2023
1 parent dfc322a commit 1f7eb6e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions xobjects/context_cupy.py
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ def to_function_arg(self, arg, value):
def num_args(self):
return len(self.description.args)

def __call__(self, shared_mem_size_bytes=None, **kwargs):
def __call__(self, **kwargs):
assert len(kwargs.keys()) == self.num_args
arg_list = []
for arg in self.description.args:
Expand All @@ -683,7 +683,9 @@ def __call__(self, shared_mem_size_bytes=None, **kwargs):
else:
n_threads = self.description.n_threads

if shared_mem_size_bytes is None:
if "shared_mem_size_bytes" in kwargs.keys():
shared_mem_size_bytes = kwargs["shared_mem_size_bytes"]
else:
shared_mem_size_bytes = self.shared_mem_size_bytes

grid_size = int(np.ceil(n_threads / self.block_size))
Expand Down

0 comments on commit 1f7eb6e

Please sign in to comment.