Skip to content

Multiple source files with link_program #598

Answered by inducer
Richardk2n asked this question in Q&A
Discussion options

You must be logged in to vote

How about this?

pyopencl/test/test_wrapper.py

Lines 1161 to 1195 in 3a96299

def test_compile_link(ctx_factory):
ctx = ctx_factory()
if ctx._get_cl_version() < (1, 2) or cl.get_cl_header_version() < (1, 2):
pytest.skip("Context and ICD loader must understand CL1.2 for compile/link")
platform = ctx.devices[0].platform
if platform.name == "Apple":
pytest.skip("Apple doesn't like our compile/link test")
queue = cl.CommandQueue(ctx)
vsink_prg = cl.Program(ctx, """//CL//
void value_sink(float x)
{
}
""").compile()
pi_h__prg = cl.Program(ctx, """//CL//
inline float get_pi()
{
return …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Richardk2n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants