FreeBSDDesktop / kms-drm

the DRM part of the linuxkpi-based KMS
63 stars 26 forks source link

clpeak massive error/warning output on vega #72

Open johalun opened 6 years ago

johalun commented 6 years ago
johannes@amd:~ % env LD_PRELOAD=/lib/libthr.so.3 clpeak

--SNIP--

input.cl:34:491: error: call to 'mad' is ambiguous
input.cl:30:50: note: expanded from macro 'MAD_64'
input.cl:29:22: note: expanded from macro 'MAD_16'
input.cl:28:43: note: expanded from macro 'MAD_4'
/usr/local/include/clc/math/mad.inc:1:39: note: candidate function
/usr/local/include/clc/math/mad.inc:1:39: note: candidate function
/usr/local/include/clc/math/mad.inc:1:39: note: candidate function
/usr/local/include/clc/math/mad.inc:1:39: note: candidate function
/usr/local/include/clc/math/mad.inc:1:39: note: candidate function
/usr/local/include/clc/math/mad.inc:1:39: note: candidate function

--SNIP--

input.cl:30:36: note: expanded from macro 'MAD_64'
input.cl:29:48: note: expanded from macro 'MAD_16'
input.cl:28:79: note: expanded from macro 'MAD_4'
/usr/local/include/clc/math/mad.inc:1:39: note: candidate function not viable: no known conversion from 'half8' (vector of 8 'half' values) to 'float' for 1st argument
/usr/local/include/clc/math/mad.inc:1:39: note: candidate function not viable: no known conversion from 'half8' (vector of 8 'half' values) to 'float2' (vector of 2 'float' values) for 1st argument
/usr/local/include/clc/math/mad.inc:1:39: note: candidate function not viable: no known conversion from 'half8' (vector of 8 'half' values) to 'float3' (vector of 3 'float' values) for 1st argument
/usr/local/include/clc/math/mad.inc:1:39: note: candidate function not viable: no known conversion from 'half8' (vector of 8 'half' values) to 'float4' (vector of 4 'float' values) for 1st argument
/usr/local/include/clc/math/mad.inc:1:39: note: candidate function not viable: no known conversion from 'half8' (vector of 8 'half' values) to 'float8' (vector of 8 'float' values) for 1st argument
/usr/local/include/clc/math/mad.inc:1:39: note: candidate function not viable: no known conversion from 'half8' (vector of 8 'half' values) to 'float16' (vector of 16 'float' values) for 1st argument
/usr/local/include/clc/math/mad.inc:1:39: note: candidate function not viable: no known conversion from 'half8' (vector of 8 'half' values) to 'double' for 1st argument
/usr/local/include/clc/math/mad.inc:1:39: note: candidate function not viable: no known conversion from 'half8' (vector of 8 'half' values) to 'double2' (vector of 2 'double' values) for 1st argument
/usr/local/include/clc/math/mad.inc:1:39: note: candidate function not viable: no known conversion from 'half8' (vector of 8 'half' values) to 'double3' (vector of 3 'double' values) for 1st argument
/usr/local/include/clc/math/mad.inc:1:39: note: candidate function not viable: no known conversion from 'half8' (vector of 8 'half' values) to 'double4' (vector of 4 'double' values) for 1st argument
/usr/local/include/clc/math/mad.inc:1:39: note: candidate function not viable: no known conversion from 'half8' (vector of 8 'half' values) to 'double8' (vector of 8 'double' values) for 1st argument
/usr/local/include/clc/math/mad.inc:1:39: note: candidate function not viable: no known conversion from 'half8' (vector of 8 'half' values) to 'double16' (vector of 16 'double' values) for 1st argument
input.cl:34:1543: error: no matching function for call to 'mad'
input.cl:30:36: note: expanded from macro 'MAD_64'
input.cl:29:61: note: expanded from macro 'MAD_16'
input.cl:28:25: note: expanded from macro 'MAD_4'
johannes@amd:~ % env LD_PRELOAD=/lib/libthr.so.3 clinfo
Number of platforms                               1
  Platform Name                                   Clover
  Platform Vendor                                 Mesa
  Platform Version                                OpenCL 1.1 Mesa 18.0.4
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd
  Platform Extensions function suffix             MESA

  Platform Name                                   Clover
Number of devices                                 1
  Device Name                                     AMD RAVEN (DRM 3.23.0 / 12.0-CURRENT, LLVM 6.0.0)
  Device Vendor                                   AMD
  Device Vendor ID                                0x1002
  Device Version                                  OpenCL 1.1 Mesa 18.0.4
  Driver Version                                  18.0.4
  Device OpenCL C Version                         OpenCL C 1.1 
  Device Type                                     GPU
  Device Profile                                  FULL_PROFILE
  Max compute units                               8
  Max clock frequency                             0MHz
  Max work item dimensions                        3
  Max work item sizes                             256x256x256
  Max work group size                             256
  Preferred work group size multiple              64
  Preferred / native vector sizes                 
    char                                                16 / 16      
    short                                                8 / 8       
    int                                                  4 / 4       
    long                                                 2 / 2       
    half                                                 8 / 8        (cl_khr_fp16)
    float                                                4 / 4       
    double                                               2 / 2        (cl_khr_fp64)
  Half-precision Floating-point support           (cl_khr_fp16)
    Denormals                                     No
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 No
    Round to infinity                             No
    IEEE754-2008 fused multiply-add               No
    Support is emulated in software               No
    Correctly-rounded divide and sqrt operations  No
  Single-precision Floating-point support         (core)
    Denormals                                     No
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 No
    Round to infinity                             No
    IEEE754-2008 fused multiply-add               No
    Support is emulated in software               No
    Correctly-rounded divide and sqrt operations  No
  Double-precision Floating-point support         (cl_khr_fp64)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
    Correctly-rounded divide and sqrt operations  No
  Address bits                                    64, Little-Endian
  Global memory size                              1867220580 (1.739GiB)
  Error Correction support                        No
  Max memory allocation                           466805145 (445.2MiB)
  Unified memory for Host and Device              No
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       32768 bits (4096 bytes)
  Global Memory cache type                        None
  Image support                                   No
  Local memory type                               Local
  Local memory size                               32768 (32KiB)
  Max constant buffer size                        466805145 (445.2MiB)
  Max number of constant args                     16
  Max size of kernel argument                     1024
  Queue properties                                
    Out-of-order execution                        No
    Profiling                                     Yes
  Profiling timer resolution                      0ns
  Execution capabilities                          
    Run OpenCL kernels                            Yes
    Run native kernels                            No
  Device Available                                Yes
  Compiler Available                              Yes
  Device Extensions                               cl_khr_byte_addressable_store cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_fp64 cl_khr_fp16

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  Clover
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   Success [MESA]
  clCreateContext(NULL, ...) [default]            Success [MESA]
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  Success (1)
    Platform Name                                 Clover
    Device Name                                   AMD RAVEN (DRM 3.23.0 / 12.0-CURRENT, LLVM 6.0.0)
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL)  Success (1)
    Platform Name                                 Clover
    Device Name                                   AMD RAVEN (DRM 3.23.0 / 12.0-CURRENT, LLVM 6.0.0)

ICD loader properties
  ICD loader Name                                 OpenCL ICD Loader
  ICD loader Vendor                               OCL Icd free software
  ICD loader Version                              2.2.11
  ICD loader Profile                              OpenCL 2.1
Segmentation fault (core dumped)

Not sure why the segfault in the end. Seem to be after exit().

valpackett commented 6 years ago

Yeah, clinfo segfaults at exit, that's not Vega specific. Possibly related to the libthr thing?

Also, try updating libclc and mesa

johalun commented 6 years ago

@myfreeweb Thanks! Maybe I'll start a poudriere build based on your repo to get all the correct deps.

valpackett commented 5 years ago

For me clpeak currently crashes after

    Global memory bandwidth (GBPS)

with

* thread #1, name = 'clpeak', stop reason = signal SIGSEGV
  * frame #0: 0x0000000000000000
    frame #1: 0x0000000801470135 libMesaOpenCL.so.1`clover::timestamp::query::query(this=0x00007fffffffc520, q=0x0000000807123dc0) at timestamp.cpp:32
    frame #2: 0x000000080145f8dd libMesaOpenCL.so.1`std::__1::__function::__func<clover::hard_event::profile(clover::command_queue&, std::__1::function<void (clover::event&)> const&) const::$_2, std::__1::allocator<clover::hard_event::profile(clover::command_queue&, std::__1::function<void (clover::event&)> const&) const::$_2>, void (clover::event&)>::operator()(clover::event&) [inlined] clover::hard_event::profile(this=0x000000080b292880, ev=0x0000000807197900)> const&) const::$_2::operator()(clover::event&) const at event.cpp:217
    frame #3: 0x000000080145f855 libMesaOpenCL.so.1`std::__1::__function::__func<clover::hard_event::profile(clover::command_queue&, std::__1::function<void (clover::event&)> const&) const::$_2, std::__1::allocator<clover::hard_event::profile(clover::command_queue&, std::__1::function<void (clover::event&)> const&) const::$_2>, void (clover::event&)>::operator()(clover::event&) [inlined] decltype(__f=0x000000080b292880, __args=0x0000000807197900)> const&) const::$_2&>(fp)(std::__1::forward<clover::event&>(fp0))) std::__1::__invoke<clover::hard_event::profile(clover::command_queue&, std::__1::function<void (clover::event&)> const&) const::$_2&, clover::event&>(clover::hard_event::profile(clover::command_queue&, std::__1::function<void (clover::event&)> const&) const::$_2&&&, clover::event&&&) at type_traits:4353
    frame #4: 0x000000080145f855 libMesaOpenCL.so.1`std::__1::__function::__func<clover::hard_event::profile(clover::command_queue&, std::__1::function<void (clover::event&)> const&) const::$_2, std::__1::allocator<clover::hard_event::profile(clover::command_queue&, std::__1::function<void (clover::event&)> const&) const::$_2>, void (clover::event&)>::operator()(clover::event&) [inlined] void std::__1::__invoke_void_return_wrapper<void>::__call<clover::hard_event::profile(__args=0x000000080b292880, __args=0x0000000807197900)> const&) const::$_2&, clover::event&>(clover::hard_event::profile(clover::command_queue&, std::__1::function<void (clover::event&)> const&) const::$_2&&&, clover::event&&&) at __functional_base:349
    frame #5: 0x000000080145f855 libMesaOpenCL.so.1`std::__1::__function::__func<clover::hard_event::profile(clover::command_queue&, std::__1::function<void (clover::event&)> const&) const::$_2, std::__1::allocator<clover::hard_event::profile(clover::command_queue&, std::__1::function<void (clover::event&)> const&) const::$_2>, void (clover::event&)>::operator()(clover::event&) [inlined] std::__1::__function::__alloc_func<clover::hard_event::profile(clover::command_queue&, std::__1::function<void (clover::event&)> const&) const::$_2, std::__1::allocator<clover::hard_event::profile(clover::command_queue&, std::__1::function<void (clover::event&)> const&) const::$_2>, void (clover::event&)>::operator(this=0x000000080b292880, __arg=0x0000000807197900)(clover::event&) at functional:1527
    frame #6: 0x000000080145f855 libMesaOpenCL.so.1`std::__1::__function::__func<clover::hard_event::profile(clover::command_queue&, std::__1::function<void (clover::event&)> const&) const::$_2, std::__1::allocator<clover::hard_event::profile(clover::command_queue&, std::__1::function<void (clover::event&)> const&) const::$_2>, void (clover::event&)>::operator(this=0x000000080b292870, __arg=0x0000000807197900)(clover::event&) at functional:1651
    frame #7: 0x000000080145e167 libMesaOpenCL.so.1`clover::event::trigger() [inlined] std::__1::__function::__value_func<void (clover::event&)>::operator(this=<unavailable>, __args=<unavailable>)(clover::event&) const at functional:1799
    frame #8: 0x000000080145e151 libMesaOpenCL.so.1`clover::event::trigger() [inlined] std::__1::function<void (clover::event&)>::operator(this=<unavailable>, __arg=<unavailable>)(clover::event&) const at functional:2347
    frame #9: 0x000000080145e151 libMesaOpenCL.so.1`clover::event::trigger(this=0x0000000807197900) at event.cpp:54
    frame #10: 0x000000080145e90e libMesaOpenCL.so.1`clover::hard_event::hard_event(this=0x0000000807197900, q=0x0000000807123dc0, command=4596, deps=<unavailable>, action=<unavailable>)>) at event.cpp:135
    frame #11: 0x000000080145be20 libMesaOpenCL.so.1`clover::intrusive_ref<clover::hard_event> clover::create<clover::hard_event, clover::command_queue&, int, clover::ref_vector<clover::event>&, std::__1::function<void (as=0x0000000807123dc0, as=0x00007fffffffc818, as=0x00007fffffffc7c8, as=<unavailable>)> >(clover::command_queue&&&, int&&, clover::ref_vector<clover::event>&&&, std::__1::function<void (clover::event&)>&&) at pointer.hpp:230
    frame #12: 0x000000080145796d libMesaOpenCL.so.1`::clEnqueueWriteBuffer(d_q=<unavailable>, d_mem=<unavailable>, blocking=1, offset=0, size=<unavailable>, ptr=0x000000080d73f3c0, num_deps=0, d_deps=0x0000000000000000, rd_ev=0x0000000000000000) at transfer.cpp:325
    frame #13: 0x00000008002a5b91 libOpenCL.so.1`clEnqueueWriteBuffer + 145
    frame #14: 0x0000000000219031 clpeak`___lldb_unnamed_symbol88$$clpeak + 801
    frame #15: 0x00000000002113b4 clpeak`___lldb_unnamed_symbol21$$clpeak + 4452
    frame #16: 0x0000000000223934 clpeak`___lldb_unnamed_symbol107$$clpeak + 52
    frame #17: 0x000000000020f10f clpeak`___lldb_unnamed_symbol1$$clpeak + 271