eholk / harlan

A language for GPU computing.
Other
1.19k stars 82 forks source link

Some tests fail with NVIDIA GPUs on Mac #111

Open eholk opened 10 years ago

eholk commented 10 years ago

Some test cases, like nbody.kfc and nbody2.kfc fail on Macs when using an NVIDIA GPU.

See the discussion thread at https://groups.google.com/d/msg/harlan-dev/l-W0xXQJPKY/Uw8K_z6gEe0J for more details.

zarzen commented 8 years ago

I am in similar issue, but different failures:

......
Creating queue for Intel(R) Core(TM) i7-3615QM CPU @ 2.30GHz
OpenCL Error: OpenCL Build Warning : Compiler build log:
<program source>:158:13: warning: unused variable 'i_27429'
        int i_27429 = get_global_id(0);
            ^

freeing region 0x1042ea000. 80 bytes of 8388608 allocated
freeing region 0x1052ea000. 64 bytes of 8388608 allocated
freeing region 0x1062ea000. 120 bytes of 8388608 allocated
[0 1 2 3 4 5 6 7]
FAILED
......
Some tests failed:
    test/scan.kfc
    test/graph-holography.kfc
Successes: 158; Failures: 2; Ignored: 30; Total: 190

I have tried this command HARLAN_DEVICE=gpu make check but got more errors.

......
OpenCL Error: OpenCL Warning : clBuildProgram failed: could not build program for 0x1024400 (HD Graphics 4000) (err:-2)
OpenCL Error: [CL_BUILD_ERROR] : OpenCL Build Error : Compiler build log:
<program source>:158:13: warning: unused variable 'i_26340'
        int i_26340 = get_global_id(0);
            ^
<program source>:173:13: warning: unused variable 'i_26349'
        int i_26349 = get_global_id(0);
            ^
Error: parse error.

<program source>:158:13: warning: unused variable 'i_26340'
        int i_26340 = get_global_id(0);
            ^
<program source>:173:13: warning: unused variable 'i_26349'
        int i_26349 = get_global_id(0);
            ^
Error: parse error.

clBuildProgram failed with error CL_BUILD_PROGRAM_FAILURE (-11) in cl++.cpp:233
FAILED
......
Some tests failed:
    test/unsafe-vec-ptr.kfc
    test/read-file.kfc
    test/raytrace.kfc
    test/nbody2.kfc
    test/nbody.kfc
    test/kernel-even-odd.kfc
    test/interp-lambda2.kfc
Successes: 153; Failures: 7; Ignored: 30; Total: 190

System info: MacOS 10.11

Intel HD Graphics 4000:

  Chipset Model:    Intel HD Graphics 4000
  Type: GPU
  Bus:  Built-In
  VRAM (Dynamic, Max):  1536 MB
  Vendor:   Intel (0x8086)
  Device ID:    0x0166
  Revision ID:  0x0009
  gMux Version: 1.9.23

NVIDIA GeForce GT 650M:

  Chipset Model:    NVIDIA GeForce GT 650M
  Type: GPU
  Bus:  PCIe
  PCIe Lane Width:  x8
  VRAM (Total): 512 MB
  Vendor:   NVIDIA (0x10de)
  Device ID:    0x0fd5
  Revision ID:  0x00a2
  ROM Revision: 3682
  gMux Version: 1.9.23

So how can I force it to use GTX650m. I have installed CUDA7.