diff options
author | Michael Bien <[email protected]> | 2010-05-01 21:18:04 +0200 |
---|---|---|
committer | Michael Bien <[email protected]> | 2010-05-01 21:18:04 +0200 |
commit | 59148a192446ddfefb13516d7ada72e6fa1661c7 (patch) | |
tree | 9c2b6f997ca06ff258e90f209958416dbf610f12 /test/com/jogamp | |
parent | 48544a02dc16ebef72aa5da00f56f77b46cf2538 (diff) |
fixed CLProgramTest on AMD platform + GPU device.
Diffstat (limited to 'test/com/jogamp')
-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{ |