mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-08 14:43:57 -05:00
tiny qcom touchups (#6396)
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user