M_PI (and related constants) are required by 6.13.2.1 in the OpenCL 2.0 C specification. I am using the Debian package of beignet 0.13: -- System Information: Debian Release: 9.0 APT prefers testing APT policy: (990, 'testing'), (500, 'stable-updates'), (500, 'unstable'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.9.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages beignet-opencl-icd:amd64 depends on: ii libc6 2.24-8 ii libdrm-intel1 2.4.74-1 ii libdrm2 2.4.74-1 ii libgcc1 1:6.2.1-5 ii libllvm3.9 1:3.9.1-1 ii libstdc++6 6.2.1-5 ii libx11-6 2:1.6.4-2 ii libxext6 2:1.3.3-1 ii libxfixes3 1:5.0.3-1 beignet-opencl-icd:amd64 recommends no packages. beignet-opencl-icd:amd64 suggests no packages. -- no debconf information
M_PI is the double precision constant, and double precision isn't supported in a default (upstream or Debian) build of Beignet; use the single precision versions (M_PI_F etc) instead. (Though as they appear to be missing even when double precision is turned on (EXPERIMENTAL_DOUBLE CMake option), this is still a bug.)
Thanks for you bug report, we have EXPERIMENTAL_DOUBLE options is because of we have not finished all of the double type built-in functions. And M_PI seems to be one of the unfinished part, we will announce you once double type is full supported.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/beignet/beignet/issues/27.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.