tenstorrent / tt-mlir

Tenstorrent MLIR compiler
https://tenstorrent.github.io/tt-mlir/
Apache License 2.0
72 stars 9 forks source link

Fixing logic for biasType retrieval in the event there is no bias input #597

Closed LPanosTT closed 2 months ago

LPanosTT commented 2 months ago

The original method of retrieving the bias:

llvm::dyn_cast_or_null<::mlir::RankedTensorType>(getBias().getType());

resulted in a segmentation fault because getBias() itself would return an incomplete object. Thus, getBias().getType() would attempt to dereference a nullptr at some point.