Skip to content

Commit 664fe3e

Browse files
author
tangbinhan
committed
fix paddle from_dlpack error
Signed-off-by: tangbinhan <tangbinhan@baidu.com>
1 parent e32703f commit 664fe3e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fastsafetensors/frameworks/_paddle.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
dtype_convert: Dict[DType, Any] = {
2323
DType.BOOL: paddle.bool,
24-
DType.I8: paddle.uint8,
24+
DType.U8: paddle.uint8,
2525
DType.I8: paddle.int8,
2626
DType.I16: paddle.int16,
2727
DType.U16: paddle.bfloat16,
@@ -37,6 +37,7 @@
3737
need_workaround_dtypes: Dict[DType, DType] = {
3838
DType.F8_E5M2: DType.I8,
3939
DType.F8_E4M3: DType.I8,
40+
DType.U16: DType.BF16,
4041
}
4142

4243
if hasattr(paddle, "float8_e5m2"):

0 commit comments

Comments
 (0)