diff options
Diffstat (limited to 'test/com/jogamp/opencl/CLProgramTest.java')
-rw-r--r-- | test/com/jogamp/opencl/CLProgramTest.java | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/test/com/jogamp/opencl/CLProgramTest.java b/test/com/jogamp/opencl/CLProgramTest.java index e6ce9207..35dbde4b 100644 --- a/test/com/jogamp/opencl/CLProgramTest.java +++ b/test/com/jogamp/opencl/CLProgramTest.java @@ -226,9 +226,16 @@ public class CLProgramTest { @Test public void kernelTest() { - String source = "__attribute__((reqd_work_group_size(512, 512, 512))) kernel void foo(void) { }\n"; + String source = "__attribute__((reqd_work_group_size(256, 256, 256))) kernel void foo(void) { }\n"; - CLContext context = CLContext.create(); + // to workaround "Internal error: Link failed." on AMD platform + GPU device + final CLPlatform platform = CLPlatform.getDefault(); + CLDevice.Type type = CLDevice.Type.DEFAULT; + if(platform.getVendor().toLowerCase().contains("amd")) { + type = CLDevice.Type.CPU; + } + + CLContext context = CLContext.create(platform, type); try{ CLProgram program = context.createProgram(source).build(); @@ -241,9 +248,9 @@ public class CLProgramTest { out.println("compile workgroup size: " + wgs[0]+" "+wgs[1]+" "+wgs[2]); - assertEquals(512, wgs[0]); - assertEquals(512, wgs[1]); - assertEquals(512, wgs[2]); + assertEquals(256, wgs[0]); + assertEquals(256, wgs[1]); + assertEquals(256, wgs[2]); }finally{ |