Skip to content

Commit

Permalink
fix variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
havogt committed Dec 19, 2024
1 parent 3bb206f commit 1c5acd6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/gt4py/storage/cartesian/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,15 +250,15 @@ def allocate_cpu(
aligned_index: Optional[Sequence[int]],
) -> np.ndarray:
device = core_defs.Device(core_defs.DeviceType.CPU, 0)
buffer = _CPUBufferAllocator.allocate(
ndarray = _CPUBufferAllocator.allocate(
shape,
core_defs.dtype(dtype),
device_id=device.device_id,
layout_map=layout_map,
byte_alignment=alignment_bytes,
aligned_index=aligned_index,
)
return cast(np.ndarray, buffer)
return cast(np.ndarray, ndarray)


def _allocate_gpu(
Expand All @@ -274,7 +274,7 @@ def _allocate_gpu(
(core_defs.DeviceType.ROCM if gt_config.GT4PY_USE_HIP else core_defs.DeviceType.CUDA),
0,
)
buffer = _GPUBufferAllocator.allocate(
ndarray = _GPUBufferAllocator.allocate(
shape,
core_defs.dtype(dtype),
device_id=device.device_id,
Expand All @@ -283,7 +283,7 @@ def _allocate_gpu(
aligned_index=aligned_index,
)

return cast("cp.ndarray", buffer.ndarray)
return cast("cp.ndarray", ndarray)


allocate_gpu = _allocate_gpu
Expand Down

0 comments on commit 1c5acd6

Please sign in to comment.