limbo018 / Limbo

Library for VLSI CAD Design Useful parsers and solvers' api are implemented.
MIT License
140 stars 50 forks source link

Rename deprecated macro assert_msg to avoid possible conflicts #12

Closed enzoleo closed 7 months ago

enzoleo commented 11 months ago

Macro Definition Conflicts

Just downloaded the latest torch 2.1 and found a weird error when compiling a placer:

/some/path/python3.11/site-packages/torch/include/ATen/core/interned_strings.h:354:1: error: macro "assert_msg" requires 2 arguments, but only 1 given
  354 | FORALL_NS_SYMBOLS(DEFINE_SYMBOL)
      | ^~~~~~~~~~~~~~~

It seems that the macro assert_msg defined in limbo/preprocessor/AssertMsg.h:34 is conflict with the one in torch 2.1. I have not checked whether it is torch 2.1 that introduced this macro or something happened accidentally, but renaming all assert_msg to limbo_assert_msg indeed works. Since the macro assert_msg is marked deprecated in AssertMsg.h, I presume changing its name would have negligible effects.

limbo018 commented 11 months ago

Hi @enzoleo , this issue has already been fixed by commit (https://github.com/limbo018/Limbo/commit/4cf5d2cd407570b0c39c6fb766b0740423b864bf) in the develop branch.

The original pull request (https://github.com/limbo018/Limbo/pull/11) was made by kazdam.

enzoleo commented 11 months ago

That's impressive. I will switch to the develop branch, though I didn't encounter this error in torch 2.0. Please decline my pull request.