We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import numpy as np import loopy as lp import pyopencl as cl ctx = cl.create_some_context() queue = cl.CommandQueue(ctx) n = 3**4 a = 2 b = 5 knl = lp.make_kernel( "{ [i]: 0<=i<n }", """ out[i] = a if i == 0 else b """ ) vec_size = 3 knl = lp.split_array_axis(knl, "out", 0, vec_size) knl = lp.split_iname(knl, "i", vec_size) knl = lp.tag_inames(knl, {"i_inner": "vec"}) knl = lp.tag_array_axes(knl, "out", "c,vec") knl = lp.set_options(knl, write_code=True) knl = lp.assume(knl, f"n % {vec_size} = 0 and n>0") knl = lp.add_and_infer_dtypes(knl, {"a": np.dtype(np.float32), "b": np.dtype(np.float32)}) device_code = lp.generate_code_v2(knl).device_code() assert "float3" in device_code
Instead of float3 you will get float4
float3
float4
The text was updated successfully, but these errors were encountered:
Fix generation of float4 when float3 requested
c5f0002
Closes gh-922
d783acc
No branches or pull requests
Instead of
float3
you will getfloat4
The text was updated successfully, but these errors were encountered: