tiny qcom touchups (#6396)

This commit is contained in:
nimlgen
2024-09-06 22:49:21 +03:00
committed by GitHub
parent 40e49b6b1a
commit d3f38faeed
2 changed files with 1 additions and 2 deletions

View File

@@ -87,6 +87,7 @@ tinygrad already supports numerous accelerators, including:
- [x] [CUDA](tinygrad/runtime/ops_cuda.py)
- [x] [AMD](tinygrad/runtime/ops_amd.py)
- [x] [NV](tinygrad/runtime/ops_nv.py)
- [x] [QCOM](tinygrad/runtime/ops_qcom.py)
And it is easy to add more! Your accelerator of choice only needs to support a total of ~25 low level ops.

View File

@@ -280,8 +280,6 @@ class QCOMProgram(HCQProgram):
if hasattr(self, 'lib_gpu'): self.device.allocator.free(self.lib_gpu, self.lib_gpu.size, options=BufferOptions(cpu_access=True, nolru=True))
class QCOMAllocator(HCQAllocator):
def __init__(self, device:QCOMDevice): super().__init__(device)
def _alloc(self, size:int, options:BufferOptions) -> HCQBuffer:
if options.image is not None:
pitch = round_up(round_up(options.image.shape[1], 16) * (4 * options.image.base.itemsize), 1 << (pitchalign:=6))