This commit is contained in:
nimlgen
2026-08-12 14:37:02 -07:00
parent 25200d9879
commit ab50dd4c74
2 changed files with 8 additions and 16 deletions
+5 -13
View File
@@ -159,8 +159,6 @@ jobs:
name: Windows (DEV=${{ matrix.dev }})
runs-on: windows-2025
timeout-minutes: 15
env:
PYTHONFAULTHANDLER: 1
steps:
- name: Checkout Code
uses: actions/checkout@v6
@@ -176,17 +174,11 @@ jobs:
- name: Check Device.DEFAULT and print some source
shell: bash
run: |
st=0
esc() { python -c "print(open('out.txt',errors='replace').read()[-1200:].replace('%','%25').replace(chr(13),'%0D').replace(chr(10),'%0A'),end='')"; }
run() { # the job log is not readable over the api, so report each tail as an annotation
lbl=$1; shift; "$@" > out.txt 2>&1; c=$?
echo "::error::$lbl exit=$c%0A$(esc)"; [ $c -eq 0 ] || st=1
}
run default-device python -c "from tinygrad import Device; from tinygrad.helpers import Target; assert Device.DEFAULT == Target.parse('${{ matrix.dev }}').device"
run plain-kernel python -m pytest test/test_tiny.py -k test_plus
run debug-kernel env DEBUG=4 python test/test_tiny.py TestTiny.test_plus
run full-test-tiny python -m pytest -n=auto test/test_tiny.py --durations=20
exit $st
python -c "from tinygrad import Device; from tinygrad.helpers import Target; assert Device.DEFAULT == Target.parse('${{ matrix.dev }}').device"
DEBUG=4 python test/test_tiny.py TestTiny.test_plus
- name: Run test_tiny
shell: bash
run: python -m pytest -n=auto test/test_tiny.py --durations=20
qcomclcompiletests:
+3 -3
View File
@@ -51,8 +51,8 @@ def quit_prog():
def worker_prog():
ring = UOp.param(0, dtypes.uint64, (RING_SLOTS * CMD_SIZE,), volatile=True)
wait, sem = UOp.param(1, dtypes.uint64, (1,), volatile=True), UOp.param(2, dtypes.uint64, (1,))
done, cur = UOp.param(3, dtypes.uint64, (1,), volatile=True), UOp.range(2**64-1, 0, dtype=dtypes.uint64)
wait, done = UOp.param(1, dtypes.uint64, (1,), volatile=True), UOp.param(2, dtypes.uint64, (1,), volatile=True)
sem, cur = UOp.param(3, dtypes.uint64, (1,)), UOp.range(2**64-1, 0, dtype=dtypes.uint64) # sem is unused on windows, it has to come last
# spin on windows, sem_wait to sleep on posix
if WIN: ready = (v:=wait.after(lw:=UOp.loop(1), cur)[0].load()).end(lw, v <= cur)
@@ -226,7 +226,7 @@ class CPUQueue:
self.ring_view, self.done_view = (b._buf.cpu_view().view(fmt='Q') for b in (self.ring, self.done))
threading.Thread(target=dev.prgs[worker_prog].fxn, daemon=True, args=[ctypes.c_uint64(x) for x in
[self.ring._buf.va_addr, self.sys._buf.va_addr if WIN else dev.func_ptr('sem_wait')._buf.va_addr, self.addr, self.done._buf.va_addr]]).start()
[self.ring._buf.va_addr, self.sys._buf.va_addr if WIN else dev.func_ptr('sem_wait')._buf.va_addr, self.done._buf.va_addr, self.addr]]).start()
def push(self, cmd:list[int]):
while self.pos - self.done_view[0] >= RING_SLOTS: pass # the ring is full, let the worker catch up