Skip to content

Commit a3c5ed8

Browse files
author
DvirDukhan
committed
fixed tensor decode assert
1 parent ee232d0 commit a3c5ed8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/serialization/RDB/decoder/current/v3/decode_v3.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ void *RAI_RDBLoadTensor_v3(RedisModuleIO *io) {
2020

2121
// For now we only support CPU tensors (except during model and script run)
2222
assert(device.device_type == kDLCPU);
23-
assert(device.device_id == 0);
23+
if (device.device_id != -1) {
24+
device.device_id = -1;
25+
}
2426

2527
DLDataType dtype;
2628
dtype.bits = RedisModule_LoadUnsigned(io);

0 commit comments

Comments
 (0)