add missing bfloat16 repr and improve assertions (#403)
- `BF16TyID` was missing a repr implementation. - Throw a better exception on impossible casts. - Add a few assertions. Tested with a debug build. - Add `pointer_dtype.__str__` to aid kernel debugging.
This commit is contained in:
committed by
GitHub
parent
d8fce83e7a
commit
985798f101
@@ -131,6 +131,7 @@ public:
|
||||
case FP16TyID: return "f16";
|
||||
case FP32TyID: return "f32";
|
||||
case FP64TyID: return "f64";
|
||||
case BF16TyID: return "bf16";
|
||||
case LabelTyID: return "label";
|
||||
case MetadataTyID: return "md";
|
||||
case TokenTyID: return "tok";
|
||||
@@ -141,8 +142,7 @@ public:
|
||||
case BlockTyID: return tile_repr();
|
||||
default: break;
|
||||
}
|
||||
assert(false);
|
||||
return "";
|
||||
throw std::logic_error("unknown type id '" + std::to_string(id_) + "'");
|
||||
};
|
||||
|
||||
private:
|
||||
|
Reference in New Issue
Block a user