The following assertion error occurs in the KrnlToLLVM conversion pass with the attached krnl.global op.
It seems that the logic for a large array to use "denseAttr.getRawData()" cannot support string type.
We avoid this issue by adding a condition to check it the type is not string (e.g. if ((!denseAttr.isSplat()) && (sizeInBytes > 1024)) { to if ((!denseAttr.getElementType().isa<StringType>()) && (!denseAttr.isSplat()) && (sizeInBytes > 1024)) { ).
However the compilation time will be increased especially for models with large category map tables (e.g. Bidaf-9), because many string constant ops are generated.
The following assertion error occurs in the KrnlToLLVM conversion pass with the attached krnl.global op. It seems that the logic for a large array to use "denseAttr.getRawData()" cannot support string type. We avoid this issue by adding a condition to check it the type is not string (e.g.
if ((!denseAttr.isSplat()) && (sizeInBytes > 1024)) {
toif ((!denseAttr.getElementType().isa<StringType>()) && (!denseAttr.isSplat()) && (sizeInBytes > 1024)) {
).However the compilation time will be increased especially for models with large category map tables (e.g. Bidaf-9), because many string constant ops are generated.
Assertion error
Sample input
Conversion code