mindspore-ai / akg

AKG (Auto Kernel Generator) is an optimizer for operators in Deep Learning Networks, which provides the ability to automatically fuse ops with specific patterns.
https://gitee.com/mindspore/akg
Apache License 2.0
214 stars 38 forks source link

fix: fix compile error for gcc11.2 #11

Open zimo-mo opened 2 years ago

zimo-mo commented 2 years ago

fix: fix compile error for gcc11.2 Linux debian 5.15.0-2 gcc-11.2 cmake-3.22.1 python3.9 mindspore commit: f9270b8e095df15aa26574a758498316dd307f2f

error eg: mindspore/akg/thirdparty/incubator-tvm/3rdparty/picojson/picojson.h:389:122: error: suggest parentheses around assignment used as truth v alue [-Werror=parentheses] 389 | GET(double, (type == int64_type && (constcast<value*>(this)->type = number_type, constcast<value*>(this)->u.number = u.int64_), | ~~~~~~~^~~~~ /home/hyolin/project/mindspore/akg/third_party/incubator-tvm/3rdparty/picojson/picojson.h:377:12: note: in definition of macro ‘GET’ 377 | return var; | ^~~