sunnypilot v2026.002.000
version: sunnypilot v2026.002.000 (staging) date: 2026-07-21T07:44:02 master commit: 2c334ede443d7391d27575af8c854a095ba702a8
This commit is contained in:
commit
de77c89cf6
3995 files changed
+1260688
No files matched your search
@@ -0,0 +1,16 @@
|
||||
# ugh, OS X OpenCL doesn't support half
|
||||
from tinygrad.runtime.ops_cl import CLDevice, CLProgram, CLCompiler
|
||||
|
||||
src = """#pragma OPENCL EXTENSION cl_khr_fp16 : enable
|
||||
__kernel void max_half(__global half* data0, const __global half* data1) {
|
||||
int gidx0 = get_group_id(0);
|
||||
data0[gidx0] = max(data1[gidx0], (half)0.0);
|
||||
}"""
|
||||
|
||||
if __name__ == "__main__":
|
||||
dev = CLDevice()
|
||||
print("created device")
|
||||
lib = CLCompiler(dev, "test").compile(src)
|
||||
print("created lib", len(lib))
|
||||
prg = CLProgram(dev, "max_half", lib)
|
||||
print("created prg")
|
||||
Reference in new issue
Block a user