cornell-zhang / hcl-dialect

HeteroCL-MLIR dialect for accelerator design
https://cornell-zhang.github.io/heterocl/index.html
Other
37 stars 15 forks source link

[Fix] Skip functions that do not have a body #201

Closed chhzh123 closed 1 year ago

chhzh123 commented 1 year ago

This PR fixes a subtle bug in LoopTransformation. Previously we suppose all the functions in an MLIR module have a function body, so we can apply customizations on that. However, some of the MLIR functions may not have a body defined in the module, but have external definitions in C/C++. In that case, we need to skip those functions to avoid possible errors.