You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bfloat16# python setup.py install
/workspaces/.venv/lib/python3.11/site-packages/setuptools/dist.py:775: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
warnings.warn(
/workspaces/.venv/lib/python3.11/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/workspaces/.venv/lib/python3.11/site-packages/setuptools/command/easy_install.py:146: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
warning: no files found matching 'bfloat16.h'
bfloat16.cc: In member function ‘greenwaves::{anonymous}::bfloat16 greenwaves::{anonymous}::ufuncs::NextAfter::operator()(greenwaves::{anonymous}::bfloat16, greenwaves::{anonymous}::bfloat16)’:
bfloat16.cc:1663:63: warning: ‘void* memcpy(void*, const void*, size_t)’ copying an object of non-trivial type ‘using bfloat16 = struct Eigen::bfloat16’ {aka ‘struct Eigen::bfloat16’} from an array of ‘uint16_t’ {aka ‘short unsigned int’} [-Wclass-memaccess]
1663 | memcpy(&out, &out_int, sizeof(bfloat16));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from eigen/Eigen/Core:170,
from bfloat16.cc:33:
eigen/Eigen/src/Core/arch/Default/BFloat16.h:58:8: note: ‘using bfloat16 = struct Eigen::bfloat16’ {aka ‘struct Eigen::bfloat16’} declared here
58 | struct bfloat16 : public bfloat16_impl::bfloat16_base {
| ^~~~~~~~
bfloat16.cc:1675:47: warning: ‘void* memcpy(void*, const void*, size_t)’ copying an object of non-trivial type ‘using bfloat16 = struct Eigen::bfloat16’ {aka ‘struct Eigen::bfloat16’} from an array of ‘uint16_t’ {aka ‘short unsigned int’} [-Wclass-memaccess]
1675 | memcpy(&out, &out_int, sizeof(bfloat16));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
eigen/Eigen/src/Core/arch/Default/BFloat16.h:58:8: note: ‘using bfloat16 = struct Eigen::bfloat16’ {aka ‘struct Eigen::bfloat16’} declared here
58 | struct bfloat16 : public bfloat16_impl::bfloat16_base {
| ^~~~~~~~
In file included from /usr/include/python3.11/Python.h:44,
from bfloat16.cc:27:
bfloat16.cc: In function ‘bool greenwaves::Initialize()’:
/usr/include/python3.11/object.h:136:30: error: lvalue required as left operand of assignment
136 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob))
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~
bfloat16.cc:1748:17: note: in expansion of macro ‘Py_TYPE’
1748 | Py_TYPE(&NPyBfloat16_Descr) = &PyArrayDescr_Type;
| ^~~~~~~
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
On Debian Bookworm, GCC 12, Python 3.11, Numpy 1.24.3.
The issue is that Py_TYPE is a function returning a PyTypeObject* so it can't be assigned a value.
Maybe there is a missing dereference ?
The text was updated successfully, but these errors were encountered:
bfloat16 could not be built since Python 3.11, for Py_TYPE has been
deprecated since Python 3.9, see PEP 674 and Common Object
Structures docs for details. This issue was covered in GreenWaves-Technologies#5.
bfloat16 could not be built on macOS, because C++11 flag is not
enabled by default in clang. This issue was covered in GreenWaves-Technologies#7.
running setup.py install fails with this error:
On Debian Bookworm, GCC 12, Python 3.11, Numpy 1.24.3.
The issue is that Py_TYPE is a function returning a
PyTypeObject*
so it can't be assigned a value.Maybe there is a missing dereference ?
The text was updated successfully, but these errors were encountered: