-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Python] Switch CIRCT Python extension and dialects to nanobind.
This follows the general nanobind porting guide and the upstream MLIR changes in the same vein. For the most part, this is a very direct migration accomplished with sed. There were a couple minor differences. Nanobind is more strict about implicit casting, which popped up in a couple places: * In MSFTModule, getNearestFreeInColumn was expecting a CIRCTMSFTPrimitiveType (int), but was actually being passed PrimitiveType enums at the call sites. Nanobind refused to automatically cast enum to int, so it was done manually. * In SVModule, SVAttributeAttr.get was expecting a bool for emitAsComment, even though it was declared as having a default of None. Nanobind refused to automatically cast None to bool, so it was done manually, with a default of false. Nanobind also prints enums slightly differently, so one FileCheck test had to be updated for ESI. Otherwise, the changes were purely mechanical.
- Loading branch information
1 parent
19f9af0
commit e30ed45
Showing
16 changed files
with
379 additions
and
392 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.