IQ.Pilot Release Commit @ bec7652
This commit is contained in:
15
artifacts/package_sources/tinygrad/test/device/test_qcom.py
Normal file
15
artifacts/package_sources/tinygrad/test/device/test_qcom.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import ctypes, platform, unittest
|
||||
from tinygrad import Device
|
||||
from tinygrad.renderer.cstyle import ClangRenderer
|
||||
|
||||
class TestQCOM(unittest.TestCase):
|
||||
# although part of the QCOM runtime, this tests flushing the CPU's dcache
|
||||
@unittest.skipUnless(isinstance(Device["CPU"].renderer, ClangRenderer) and platform.machine().lower() in {"arm64", "aarch64"},
|
||||
"dcache_flush's inline asm needs ClangRenderer, and runs on arm64")
|
||||
def test_dcache_flush(self):
|
||||
from tinygrad.runtime.ops_qcom import dcache_flush
|
||||
buf = (ctypes.c_uint8 * 64)()
|
||||
dcache_flush().fxn(buf, 0)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user