Open xuhancn opened 3 days ago
Hi Xu,
I think the problem is that the two-parameter static_assert(bool, const char *)
is supported, but the single-parameter `static_assert(bool)
is not. The former is part of the C++11
standard, whereas the latter was only added to C++17
(link).
Does it work if you add a second parameter ""
, e.g. as is done in src/xnnpack/buffer.h
?
Cheers, Pedro
Fixed this in #7535.
Hi @gonnet new error reported from PyTorch CI: https://hud.pytorch.org/pr/141754 I will setup a local MSVC 2019 environment to do more debug work next week. Thanks.
My pervious PR to add build option to turn off
libm
, link: https://github.com/google/XNNPACK/pull/7522After that, I tried to upgrade
XNNPACK
ofPyTorch
, but I foundstatic_assert
was not supported on MSVC 2019, error CI link: https://hud.pytorch.org/pr/141754.I read the code current
XNNPACK
code use somestatic_assert
, such as https://github.com/google/XNNPACK/blob/668a518ebcfd5ae0024ebd9d540868e26ff93171/src/xnnpack/buffer.h#L55static_assert
is not supported well by MSVC 2019, reference: https://learn.microsoft.com/en-us/cpp/build/reference/zc-static-assert?view=msvc-160So,
static_assert
will bring in some compatibility issue on MSVC 2019. It also limitedXNNPACK
upgrade byPyTorch
. If we can downgradestatic_assert
toassert
, and letXNNPACK
has better compatibility.CC: @dsharletg