Code Monkey home page Code Monkey logo

Comments (32)

inferrna avatar inferrna commented on May 19, 2024 3

I guess there is a symbolic link in the test directory, is that right?

Yes, build directory is a symlink to cocl directory inside which I build the package.
OFFSET_32BIT=1 py.test -svx test/test_branching.py
passed, now running all with
OFFSET_32BIT=1 py.test -svx

from coriander.

hughperkins avatar hughperkins commented on May 19, 2024

Please define:

export OFFSET_32BIT=1

And also CLANG_HOME
And try again
For an initial test, let's try like this:

OFFSET_32BIT=1 py.test -svx test/test_branching.py

The -sv will mean we see all the output. -x will make it stop after first failure

The files you see are intermediate files, and are normal.

(reposted, because original email reply didnt work with markdown)

from coriander.

hughperkins avatar hughperkins commented on May 19, 2024

Also, it looks like it is recursing. I guess there is a symbolic link in the test directory, is that right?

(reposting, so sequence is correct)

from coriander.

hughperkins avatar hughperkins commented on May 19, 2024

OFFSET_32BIT=1 py.test -svx test/test_branching.py passed

Excellent news!

from coriander.

inferrna avatar inferrna commented on May 19, 2024

env CLANG_HOME=/usr/lib/llvm-3.8/ OFFSET_32BIT=1 py.test-3 -sv -r a|highlight --src-lang=c -O html -I output
https://www.dropbox.com/s/ozgs7aqpngtlovy/cocl_py.test-3.html

from coriander.

hughperkins avatar hughperkins commented on May 19, 2024

You sent me an html file, containing build output. I'm not very keen on opening random html snippets in my browser on the whole :-) Can you paste the output into https://gist.github.com please.

from coriander.

inferrna avatar inferrna commented on May 19, 2024

Ok - https://gist.github.com/inferrna/c82d8ab873ae3b6101c928c87a388f72

from coriander.

hughperkins avatar hughperkins commented on May 19, 2024

Ok. Lets pick one single error, and just fix that one please :-)

Can you run:

OFFSET32_BIT=1 CLANG_HOME=/usr/lib/llvm-3.8 py.test -svx test/test_compile.py -k pointerpointer.cu-mykernel

and then send me:

  • full output from this (via gist)
  • following files:
    • /tmp/testprog-device.ll
    • /tmp/testprog-device.cl

Just for reference purposes, on my box, this test gives the following output:

$ OFFSET32_BIT=1 CLANG_HOME=/usr/lib/llvm-3.8_ py.test -svx test/test_compile.py -k pointerpointer.cu-mykernel
============================= test session starts ==============================
platform linux -- Python 3.5.1+, pytest-3.0.3, py-1.4.31, pluggy-0.4.0 -- /env/env3cl/bin/python3
cachedir: .cache
rootdir: /home/cuda-on-cl, inifile: pytest.ini
plugins: pep8-1.0.6
collecting 1 itemsmarking xfail
marking xfail
marking xfail
marking xfail
collected 10 items 

test/test_compile.py::test_compile[test/pointerpointer.cu-mykernel] X server found. dri2 connection failed! 
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
X server found. dri2 connection failed! 
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
X server found. dri2 connection failed! 
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
X server found. dri2 connection failed! 
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
X server found. dri2 connection failed! 
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
X server found. dri2 connection failed! 
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
X server found. dri2 connection failed! 
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
X server found. dri2 connection failed! 
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
X server found. dri2 connection failed! 
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
X server found. dri2 connection failed! 
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
X server found. dri2 connection failed! 
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
context <pyopencl.Context at 0x1a7a030 on <pyopencl.Device 'Intel(R) HD Graphics 5500 BroadWell U-Processor GT2' on 'Intel Gen OCL Driver' at 0x7f8146ff8fe0>>
options []
bin/cocl -c /tmp/testprog.cu
+ /usr/lib/llvm-3.8_/bin/clang++ -DUSE_CLEW -std=c++11 -x cuda --cuda-gpu-arch=sm_30 --cuda-device-only -emit-llvm -O0 -S -I/usr/lib/llvm-3.8_/include -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/usr/lib/llvm-3.8_/include -std=c++11 -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -std=c++11 -ffunction-sections -fdata-sections -O2 -fexceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/ubuntu/git/cuda-on-cl/include/EasyCL -I/home/ubuntu/git/cuda-on-cl/include/cocl -I/home/ubuntu/git/cuda-on-cl/src -I/home/ubuntu/git/cuda-on-cl/src/EasyCL -I/home/ubuntu/git/cuda-on-cl/src/EasyCL/thirdparty/clew/include -include /home/ubuntu/git/cuda-on-cl/include/cocl/cocl.h -include /home/ubuntu/git/cuda-on-cl/include/cocl/fake_funcs.h -include /home/ubuntu/git/cuda-on-cl/include/cocl/cocl_deviceside.h -I/home/ubuntu/git/cuda-on-cl/include /tmp/testprog.cu -o /tmp/testprog-device-noopt.ll
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option]
1 warning generated.
+ /usr/lib/llvm-3.8_/bin/opt -S -o /tmp/testprog-device.ll /tmp/testprog-device-noopt.ll
+ /usr/lib/llvm-3.8_/bin/clang++ -DUSE_CLEW -std=c++11 -x cuda --cuda-host-only -emit-llvm -O3 -S -I/usr/lib/llvm-3.8_/include -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/usr/lib/llvm-3.8_/include -std=c++11 -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -std=c++11 -ffunction-sections -fdata-sections -O2 -fexceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/ubuntu/git/cuda-on-cl/include -I/home/ubuntu/git/cuda-on-cl/include/EasyCL -I/home/ubuntu/git/cuda-on-cl/include/cocl -I/home/ubuntu/git/cuda-on-cl/src -I/home/ubuntu/git/cuda-on-cl/src/EasyCL/thirdparty/clew/include -I/home/ubuntu/git/cuda-on-cl/src/EasyCL -I/usr/lib/llvm-3.8_/include -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/usr/lib/llvm-3.8_/include -std=c++11 -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -std=c++11 -ffunction-sections -fdata-sections -O2 -fexceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -include /home/ubuntu/git/cuda-on-cl/include/cocl/cocl.h -include /home/ubuntu/git/cuda-on-cl/include/cocl/fake_funcs.h -include /home/ubuntu/git/cuda-on-cl/include/cocl/cocl_hostside.h /tmp/testprog.cu -o /tmp/testprog-hostraw.ll
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option]
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option]
2 warnings generated.
+ /home/ubuntu/git/cuda-on-cl/build/patch-hostside --hostrawfile /tmp/testprog-hostraw.ll --devicellfile /tmp/testprog-device.ll --hostpatchedfile /tmp/testprog-hostpatched.ll
+ /usr/lib/llvm-3.8_/bin/clang++ -I/usr/lib/llvm-3.8_/include -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/usr/lib/llvm-3.8_/include -std=c++11 -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -std=c++11 -ffunction-sections -fdata-sections -O2 -fexceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DUSE_CLEW -c /tmp/testprog-hostpatched.ll -O3 -o /tmp/testprog.o
clang: warning: argument unused during compilation: '-I /usr/lib/llvm-3.8_/include'
clang: warning: argument unused during compilation: '-I /usr/lib/llvm-3.8_/include'
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option]
1 warning generated.
+ [ ! 1 ]

build/ir-to-opencl --inputfile /tmp/testprog-device.ll --outputfile /tmp/testprog-device.cl --kernelname  --add_ir_to_cl
terminate called after throwing an instance of 'std::runtime_error'
  what():  Couldnt find kernel 

mangledname _Z8mykernelPfP8MyStructi
options []
bin/cocl -c /tmp/testprog.cu
+ /usr/lib/llvm-3.8_/bin/clang++ -DUSE_CLEW -std=c++11 -x cuda --cuda-gpu-arch=sm_30 --cuda-device-only -emit-llvm -O0 -S -I/usr/lib/llvm-3.8_/include -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/usr/lib/llvm-3.8_/include -std=c++11 -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -std=c++11 -ffunction-sections -fdata-sections -O2 -fexceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/ubuntu/git/cuda-on-cl/include/EasyCL -I/home/ubuntu/git/cuda-on-cl/include/cocl -I/home/ubuntu/git/cuda-on-cl/src -I/home/ubuntu/git/cuda-on-cl/src/EasyCL -I/home/ubuntu/git/cuda-on-cl/src/EasyCL/thirdparty/clew/include -include /home/ubuntu/git/cuda-on-cl/include/cocl/cocl.h -include /home/ubuntu/git/cuda-on-cl/include/cocl/fake_funcs.h -include /home/ubuntu/git/cuda-on-cl/include/cocl/cocl_deviceside.h -I/home/ubuntu/git/cuda-on-cl/include /tmp/testprog.cu -o /tmp/testprog-device-noopt.ll
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option]
1 warning generated.
+ /usr/lib/llvm-3.8_/bin/opt -S -o /tmp/testprog-device.ll /tmp/testprog-device-noopt.ll
+ /usr/lib/llvm-3.8_/bin/clang++ -DUSE_CLEW -std=c++11 -x cuda --cuda-host-only -emit-llvm -O3 -S -I/usr/lib/llvm-3.8_/include -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/usr/lib/llvm-3.8_/include -std=c++11 -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -std=c++11 -ffunction-sections -fdata-sections -O2 -fexceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/ubuntu/git/cuda-on-cl/include -I/home/ubuntu/git/cuda-on-cl/include/EasyCL -I/home/ubuntu/git/cuda-on-cl/include/cocl -I/home/ubuntu/git/cuda-on-cl/src -I/home/ubuntu/git/cuda-on-cl/src/EasyCL/thirdparty/clew/include -I/home/ubuntu/git/cuda-on-cl/src/EasyCL -I/usr/lib/llvm-3.8_/include -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/usr/lib/llvm-3.8_/include -std=c++11 -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -std=c++11 -ffunction-sections -fdata-sections -O2 -fexceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -include /home/ubuntu/git/cuda-on-cl/include/cocl/cocl.h -include /home/ubuntu/git/cuda-on-cl/include/cocl/fake_funcs.h -include /home/ubuntu/git/cuda-on-cl/include/cocl/cocl_hostside.h /tmp/testprog.cu -o /tmp/testprog-hostraw.ll
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option]
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option]
2 warnings generated.
+ /home/ubuntu/git/cuda-on-cl/build/patch-hostside --hostrawfile /tmp/testprog-hostraw.ll --devicellfile /tmp/testprog-device.ll --hostpatchedfile /tmp/testprog-hostpatched.ll
+ /usr/lib/llvm-3.8_/bin/clang++ -I/usr/lib/llvm-3.8_/include -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/usr/lib/llvm-3.8_/include -std=c++11 -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -std=c++11 -ffunction-sections -fdata-sections -O2 -fexceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DUSE_CLEW -c /tmp/testprog-hostpatched.ll -O3 -o /tmp/testprog.o
clang: warning: argument unused during compilation: '-I /usr/lib/llvm-3.8_/include'
clang: warning: argument unused during compilation: '-I /usr/lib/llvm-3.8_/include'
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option]
1 warning generated.
+ [ ! 1 ]

build/ir-to-opencl --inputfile /tmp/testprog-device.ll --outputfile /tmp/testprog-device.cl --kernelname _Z8mykernelPfP8MyStructi --add_ir_to_cl

PASSED

============================== 9 tests deselected ==============================
==================== 1 passed, 9 deselected in 3.51 seconds ===================```

from coriander.

hughperkins avatar hughperkins commented on May 19, 2024

(or you can choose if you want:

OFFSET32_BIT=1 CLANG_HOME=/usr/lib/llvm-3.8 py.test -svx test/test_compile.py -k pointerpointer.cu-myte6kernel

This passes ok for me too. Similar output to the above

...
2 warnings generated.
clang: warning: argument unused during compilation: '-I /usr/lib/llvm-3.8_/include'
clang: warning: argument unused during compilation: '-I /usr/lib/llvm-3.8_/include'
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option]
1 warning generated.

build/ir-to-opencl --inputfile /tmp/testprog-device.ll --outputfile /tmp/testprog-device.cl --kernelname  --add_ir_to_cl
terminate called after throwing an instance of 'std::runtime_error'
  what():  Couldnt find kernel 

mangledname _Z11myte6kernelP16TensorEvaluator6PfP9GpuDeviceiii
options []
bin/cocl -c /tmp/testprog.cu
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option]
1 warning generated.
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option]
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option]
2 warnings generated.
clang: warning: argument unused during compilation: '-I /usr/lib/llvm-3.8_/include'
clang: warning: argument unused during compilation: '-I /usr/lib/llvm-3.8_/include'
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option]
1 warning generated.

build/ir-to-opencl --inputfile /tmp/testprog-device.ll --outputfile /tmp/testprog-device.cl --kernelname _Z11myte6kernelP16TensorEvaluator6PfP9GpuDeviceiii --add_ir_to_cl

PASSED

============================== 9 tests deselected ==============================
==================== 1 passed, 9 deselected in 3.52 seconds ============

from coriander.

inferrna avatar inferrna commented on May 19, 2024

https://gist.github.com/inferrna/d1e608b4bdec84f7ace00993be608252

$ OFFSET32_BIT=1 CLANG_HOME=/usr/lib/llvm-3.8 py.test -svx test/test_compile.py -k pointerpointer.cu-mykernel
======================================================================== test session starts =========================================================================
platform linux -- Python 3.5.2, pytest-2.9.1, py-1.4.31, pluggy-0.3.1 -- /usr/bin/python3
cachedir: .cache
rootdir: /media/Compressed/Drivers_bios/src/dev/tensorflow-cl/third_party/cuda-on-cl, inifile: pytest.ini
collecting 0 itemsmarking xfail
marking xfail
marking xfail
marking xfail
collected 9 items 

test/test_compile.py::test_compile[test/pointerpointer.cu-mykernel] context <pyopencl.Context at 0x2e1ea40 on <pyopencl.Device 'Pitcairn' on 'AMD Accelerated Parallel Processing' at 0x2eaac00>>
options []
bin/cocl -c /tmp/testprog.cu
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option]
1 warning generated.
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option]
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option]
2 warnings generated.
clang: warning: argument unused during compilation: '-I /usr/lib/llvm-3.8/include'
clang: warning: argument unused during compilation: '-I /usr/lib/llvm-3.8/include'
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option]
1 warning generated.

build/ir-to-opencl --inputfile /tmp/testprog-device.ll --outputfile /tmp/testprog-device.cl --kernelname  --add_ir_to_cl
terminate called after throwing an instance of 'std::runtime_error'
  what():  Couldnt find kernel 

mangledname _Z8mykernelPfP8MyStructi
options []
bin/cocl -c /tmp/testprog.cu
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option]
1 warning generated.
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option]
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option]
2 warnings generated.
clang: warning: argument unused during compilation: '-I /usr/lib/llvm-3.8/include'
clang: warning: argument unused during compilation: '-I /usr/lib/llvm-3.8/include'
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option]
1 warning generated.

build/ir-to-opencl --inputfile /tmp/testprog-device.ll --outputfile /tmp/testprog-device.cl --kernelname _Z8mykernelPfP8MyStructi --add_ir_to_cl

/usr/local/lib/python3.5/dist-packages/pyopencl/__init__.py:206: CompilerWarning: Non-empty compiler output encountered. Set the environment variable PYOPENCL_COMPILER_OUTPUT=1 to see more.
  "to see more.", CompilerWarning)
PASSED

======================================================== 8 tests deselected by '-kpointerpointer.cu-mykernel' ========================================================
=============================================================== 1 passed, 8 deselected in 5.40 seconds ===============================================================```

from coriander.

hughperkins avatar hughperkins commented on May 19, 2024

Ok. mykernel passes, I noticed that after my first post :-P How about myte6kernel?

from coriander.

inferrna avatar inferrna commented on May 19, 2024

Gist https://gist.github.com/inferrna/d1e608b4bdec84f7ace00993be608252
updated with new test output

from coriander.

hughperkins avatar hughperkins commented on May 19, 2024

Hmmm, ok, I see. I can fix that. I htink :-)

from coriander.

hughperkins avatar hughperkins commented on May 19, 2024

Try now, using branch dev?

from coriander.

inferrna avatar inferrna commented on May 19, 2024

Test passed in dev branch, gist https://gist.github.com/inferrna/c82d8ab873ae3b6101c928c87a388f72 also updated with all tests output

from coriander.

hughperkins avatar hughperkins commented on May 19, 2024

Cool :-) Does that mean that all non-xfailing tests are passing now? Possible to see the output of OFFSET_32BIT=1 CLANG_HOME=/usr/lib/llvm-3.8 py.test -v ?

from coriander.

inferrna avatar inferrna commented on May 19, 2024

https://gist.github.com/inferrna/c82d8ab873ae3b6101c928c87a388f72 updated with
CLANG_HOME=/usr/lib/llvm-3.8/ OFFSET_32BIT=1 py.test-3 -v -r a

from coriander.

hughperkins avatar hughperkins commented on May 19, 2024

Excellent! All passing :-) You can ignore the xfails, thats ok.

What about the tests in the build directory? ie, if you do:

cd build
make run-tests

?

from coriander.

inferrna avatar inferrna commented on May 19, 2024

Here it is https://gist.github.com/inferrna/604e9f84ea69f3031f54a84e5edf641a

And almost forget - last pytest run ended with segfault.

$ OFFSET32_BIT=1 CLANG_HOME=/usr/lib/llvm-3.8 py.test -svx test/tf/test_tf.py 
======================================================================== test session starts =========================================================================
platform linux -- Python 3.5.2, pytest-2.9.1, py-1.4.31, pluggy-0.3.1 -- /usr/bin/python3
cachedir: .cache
rootdir: /media/Compressed/Drivers_bios/src/dev/tensorflow-cl/third_party/cuda-on-cl, inifile: pytest.ini
collected 2 items 

test/tf/test_tf.py::test_cwise_sqrt <- test/test/test/test/test/test/test/test/test/test/test/test/test/test/test/test/test/test/test/test/test/test/test/test/test/test/test/test/test/test/test/test/test/test/test/test/test/test/test/test/test/tf/test_tf.py context <pyopencl.Context at 0x2df5410 on <pyopencl.Device 'Pitcairn' on 'AMD Accelerated Parallel Processing' at 0x2e80150>>
options []
opt_options []
iropencl_options []
/usr/lib/llvm-3.8/bin/opt -S test/tf/samples/cwise_op_gpu_sqrt-device-noopt.ll -o /tmp/test-opt.ll
build/ir-to-opencl --inputfile /tmp/test-opt.ll --outputfile /tmp/test-device.cl --kernelname _ZN5Eigen8internal15EigenMetaKernelINS_15TensorEvaluatorIKNS_14TensorAssignOpINS_9TensorMapINS_6TensorIfLi1ELi1EiEELi16ENS_11MakePointerEEEKNS_18TensorCwiseUnaryOpINS0_14scalar_sqrt_opIfEEKNS4_INS5_IKfLi1ELi1EiEELi16ES7_EEEEEENS_9GpuDeviceEEEiEEvT_T0_
Segmentation fault (core dumped)

from coriander.

hughperkins avatar hughperkins commented on May 19, 2024

Ok. the make-runtests is passing (there's just one that is failing, because it needs >=2 gpus available to run. Thats fine)

For cwise test ... hmmm.... we should first find which executable is crashing. from the output above, it looks like it is opt that is crashing??? Can you try running:

/usr/lib/llvm-3.8/bin/opt -S test/tf/samples/cwise_op_gpu_sqrt-device-noopt.ll -o /tmp/test-opt.ll
build/ir-to-opencl --inputfile /tmp/test-opt.ll --outputfile /tmp/test-device.cl --kernelname _ZN5Eigen8internal15EigenMetaKernelINS_15TensorEvaluatorIKNS_14TensorAssignOpINS_9TensorMapINS_6TensorIfLi1ELi1EiEELi16ENS_11MakePointerEEEKNS_18TensorCwiseUnaryOpINS0_14scalar_sqrt_opIfEEKNS4_INS5_IKfLi1ELi1EiEELi16ES7_EEEEEENS_9GpuDeviceEEEiEEvT_T0_

... and see what happens? I kind of doubt it is opt that is crashing, because it's a standard part of clang, and the input is just hte output from running clang -x cuda on the input .cu file.

from coriander.

hughperkins avatar hughperkins commented on May 19, 2024

Well... I need to know which line in the python script crashed. Can you give the full output from running OFFSET32_BIT=1 CLANG_HOME=/usr/lib/llvm-3.8 py.test -svx test/tf/test_tf.py please? (I think there must be some python stack trace too somewhere?)

from coriander.

hughperkins avatar hughperkins commented on May 19, 2024

Actually, hold off a sec. let me update the script, to print out a bit more info.

from coriander.

hughperkins avatar hughperkins commented on May 19, 2024

added a bit more debug output, in de5b094 Can you pul down the latest changes to dev branch, and give the full output for OFFSET32_BIT=1 CLANG_HOME=/usr/lib/llvm-3.8 py.test -svx test/tf/test_tf.py please? Also, can you provide the following files, if they exist:

  • /tmp/test-opt.ll
  • /tmp/test-device.cl

from coriander.

inferrna avatar inferrna commented on May 19, 2024
======================================================================== test session starts =========================================================================
platform linux -- Python 3.5.2, pytest-2.9.1, py-1.4.31, pluggy-0.3.1 -- /usr/bin/python3
cachedir: .cache
rootdir: /media/Compressed/Drivers_bios/src/dev/tensorflow-cl/third_party/cuda-on-cl, inifile: pytest.ini
collected 2 items 

test/tf/test_tf.py::test_cwise_sqrt context <pyopencl.Context at 0x1fa8c50 on <pyopencl.Device 'Pitcairn' on 'AMD Accelerated Parallel Processing' at 0x204a120>>
options []
opt_options []
iropencl_options []
running [/usr/lib/llvm-3.8/bin/opt -S test/tf/samples/cwise_op_gpu_sqrt-device-noopt.ll -o /tmp/test-opt.ll]

running [build/ir-to-opencl --inputfile /tmp/test-opt.ll --outputfile /tmp/test-device.cl --kernelname _ZN5Eigen8internal15EigenMetaKernelINS_15TensorEvaluatorIKNS_14TensorAssignOpINS_9TensorMapINS_6TensorIfLi1ELi1EiEELi16ENS_11MakePointerEEEKNS_18TensorCwiseUnaryOpINS0_14scalar_sqrt_opIfEEKNS4_INS5_IKfLi1ELi1EiEELi16ES7_EEEEEENS_9GpuDeviceEEEiEEvT_T0_]

creating program...
building kernel...
Segmentation fault (core dumped)

Both /tmp/test-opt.ll and /tmp/test-device.cl: https://gist.github.com/inferrna/2c5a56c385e51b63366a96b9d29178f0
I tried to compile /tmp/test-device.cl with pyopencl and it failed when I selected Pitcairn device, but compiled success for CPU. Both devices were present by amd catalyst driver. After I tried to build and analyse this kernel with AMD CodeXL - and with selected Pitcairn device it also failed. You may try to debug it this way. Also it very possible to be just problem of my system configuration - I'm using catalyst 15.12 with patched 4.7 kernel.

from coriander.

hughperkins avatar hughperkins commented on May 19, 2024

Ok. So, the segfault is probably happening inside the GPU driver, at the time of compiling the OpenCL code.

What we need to do probably. "we" meaning: "you" :-P. Is: comment out bits of the code, until we find a single line that if we comment/uncomment changes whether it crashes or not. Ideally the line should be the simplest line possible, ie preferably some assignment or something, not just a call to another function.

I would start by commenting out hte entire contents of the kernel funtoin, ie _ZN5Eigen8internal15EigenMetaKernelINS_15TensorEvaluatorIKNS_14TensorAssignOpINS_9TensorMapINS_6TensorIfLi1ELi1EiEELi16ENS_11MakePointerEEEKNS_18TensorCwiseUnaryOpINS0_14scalar_sqrt_opIfEEKNS4_INS5_IKfLi1ELi1EiEELi16ES7_EEEEEENS_9GpuDeviceEEEiEEvT_T0_, and compile it, eg using pyopencl. And see if it still crashes. If it still crashes, get back to me, and I'll suggest what else we can commetn out. If it doesnt crash, then gradually uncomment lines in the kernel function, until you find the first line that, uncommenting it, casesu the compiler to crash.

from coriander.

inferrna avatar inferrna commented on May 19, 2024

Kernel name seems too long

>>> s = open("/tmp/test-device.cl.orig", "r").read().replace("_ZN5Eigen8internal15EigenMetaKernelINS_15TensorEvaluatorIKNS_14TensorAssignOpINS_9TensorMapINS_6TensorIfLi1ELi1EiEELi16ENS_11MakePointerEEEKNS_18TensorCwiseUnaryOpINS0_14scalar_sqrt_opIfEEKNS4_INS5_IKfLi1ELi1EiEELi16ES7_EEEEEENS_9GpuDeviceEEEiEEvT_T0_", "o"*246)
>>> cl.Program(ctx, s).build()
<pyopencl.Program object at 0x7f9a7bf67630>
>>> s = open("/tmp/test-device.cl.orig", "r").read().replace("_ZN5Eigen8internal15EigenMetaKernelINS_15TensorEvaluatorIKNS_14TensorAssignOpINS_9TensorMapINS_6TensorIfLi1ELi1EiEELi16ENS_11MakePointerEEEKNS_18TensorCwiseUnaryOpINS0_14scalar_sqrt_opIfEEKNS4_INS5_IKfLi1ELi1EiEELi16ES7_EEEEEENS_9GpuDeviceEEEiEEvT_T0_", "o"*247)
>>> cl.Program(ctx, s).build()
<pyopencl.Program object at 0x7f9a7bf67b00>
>>> s = open("/tmp/test-device.cl.orig", "r").read().replace("_ZN5Eigen8internal15EigenMetaKernelINS_15TensorEvaluatorIKNS_14TensorAssignOpINS_9TensorMapINS_6TensorIfLi1ELi1EiEELi16ENS_11MakePointerEEEKNS_18TensorCwiseUnaryOpINS0_14scalar_sqrt_opIfEEKNS4_INS5_IKfLi1ELi1EiEELi16ES7_EEEEEENS_9GpuDeviceEEEiEEvT_T0_", "o"*248)
>>> cl.Program(ctx, s).build()
Segmentation fault (core dumped)

from coriander.

hughperkins avatar hughperkins commented on May 19, 2024

from coriander.

hughperkins avatar hughperkins commented on May 19, 2024

Updated dev branch with a draft fix. Can you pull down the latest dev branch, and see to what extent that fixes the issue with long fnciton names, and the failing tests? 4b3d457

from coriander.

inferrna avatar inferrna commented on May 19, 2024

Kernel compiled but test failed
https://gist.github.com/inferrna/ccbcedec405c600970a5a097cf995571

from coriander.

hughperkins avatar hughperkins commented on May 19, 2024

from coriander.

inferrna avatar inferrna commented on May 19, 2024

Test passed. I also started to run all tests and will report result later

from coriander.

hughperkins avatar hughperkins commented on May 19, 2024

from coriander.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.