Skip to content

Commit

Permalink
Fix upper shape
Browse files Browse the repository at this point in the history
  • Loading branch information
davschneller committed Apr 6, 2024
1 parent 8371ea8 commit 6cca2a1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion yateto/codegen/gpukernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ def make_tensor(op, dims):
for i, dim in enumerate(dims):
if dim == 0:
currentRange[i] = currentRange[i].aligned(self._arch)
currentShape[i] = max(currentShape[i], currentRange[i].stop)

# unstable/incorrect? TODO: check (for now, it should work)
currentShape[i] = max(self._arch.alignedUpper(currentShape[i]), currentRange[i].stop)
entry = self._get_kernelforge_matrix(tensor=op,
tensor_variable=op,
shape=currentShape,
Expand Down

0 comments on commit 6cca2a1

Please sign in to comment.