From a808f807c6dc1bd8929dd264fcb1fc86c313480b Mon Sep 17 00:00:00 2001 From: Megvii Engine Team Date: Wed, 24 Jun 2020 21:36:01 +0800 Subject: [PATCH] feat(externcopr/nvidaopticalflow): fix output and fix cu context issue on diff thread, nvof loader outptr share with mgb ptr, upgrade lastest nvof sdk GitOrigin-RevId: 6e003c64282ef2f119402dc602f7a27beae4a776 --- src/serialization/impl/extern_c_opr.cpp | 4 ++++ src/serialization/include/megbrain/serialization/extern_c_opr.h | 1 + 2 files changed, 5 insertions(+) diff --git a/src/serialization/impl/extern_c_opr.cpp b/src/serialization/impl/extern_c_opr.cpp index f4f2a4e3..f78a4130 100644 --- a/src/serialization/impl/extern_c_opr.cpp +++ b/src/serialization/impl/extern_c_opr.cpp @@ -59,6 +59,8 @@ MGBDType dtype_cpp2c(DType dtype) { return MGB_DTYPE_FLOAT32; case DTypeEnum::Int32: return MGB_DTYPE_INT32; + case DTypeEnum::Int16: + return MGB_DTYPE_INT16; case DTypeEnum::Uint8: return MGB_DTYPE_UINT8; #if !MEGDNN_DISABLE_FLOAT16 @@ -75,6 +77,8 @@ DType dtype_c2cpp(MGBDType dtype) { switch (dtype) { case MGB_DTYPE_UINT8: return dtype::Uint8{}; + case MGB_DTYPE_INT16: + return dtype::Int16{}; case MGB_DTYPE_INT32: return dtype::Int32{}; case MGB_DTYPE_FLOAT32: diff --git a/src/serialization/include/megbrain/serialization/extern_c_opr.h b/src/serialization/include/megbrain/serialization/extern_c_opr.h index 8967c507..9795cc87 100644 --- a/src/serialization/include/megbrain/serialization/extern_c_opr.h +++ b/src/serialization/include/megbrain/serialization/extern_c_opr.h @@ -36,6 +36,7 @@ typedef enum MGBDType { MGB_DTYPE_UINT8, //! IEEE 754-based half-precision floating MGB_DTYPE_FLOAT16, + MGB_DTYPE_INT16, } MGBDType; typedef struct MGBTensorShape {