diff --git a/tinygrad/runtime/ops_dsp.py b/tinygrad/runtime/ops_dsp.py index bc6010571c..00a0b8486b 100644 --- a/tinygrad/runtime/ops_dsp.py +++ b/tinygrad/runtime/ops_dsp.py @@ -2,10 +2,9 @@ from __future__ import annotations import ctypes, os, mmap, tempfile, pathlib, array, functools, threading, contextlib, sys, subprocess, struct assert sys.platform != 'win32' from tinygrad.device import BufferSpec, Compiled, Allocator, Compiler, CompilerSet, CompilerPair -from tinygrad.runtime.ops_cpu import CPUAllocator from tinygrad.dtype import dtypes, DType, PtrDType from tinygrad.uop.ops import Ops, UOp -from tinygrad.helpers import getenv, round_up, mv_address, to_mv, cpu_objdump, system, DEBUG +from tinygrad.helpers import getenv, round_up, mv_address, to_mv, cpu_objdump, system, DEBUG, suppress_finalizing from tinygrad.renderer.cstyle import ClangRenderer from tinygrad.runtime.autogen import libc, qcom_dsp if getenv("IOCTL"): import extra.dsp.run # noqa: F401 # pylint: disable=unused-import @@ -99,14 +98,16 @@ class DSPBuffer: class DSPAllocator(Allocator['DSPDevice']): def _alloc(self, size:int, options:BufferSpec): - b = qcom_dsp.ION_IOC_ALLOC(self.dev.ion_fd, len=size, align=0x200, heap_id_mask=1<