UNSAFE_FLOAT4 env

This commit is contained in:
George Hotz
2022-06-22 08:20:29 -07:00
parent 73415e20ab
commit 3e13e3330a

View File

@@ -133,7 +133,7 @@ class OpenCLBuffer(GPUBuffer):
ewtypes.append(f"__global const float4 *{name}_g")
getters.append(f"inline float4 get4_{name}(__global const float4 *x, const sampler_t smp, int2 loc, int gid) {{"+
f"return x[gid/4]; }}")
elif False:
elif int(os.getenv("UNSAFE_FLOAT4", 0)):
# use float4 indexed (HACK!)
# TODO: work out when this is okay
ewtypes.append(f"__global const float4 *{name}_g")