@@ -204,7 +204,7 @@ TVM_FFI_STATIC_INIT_BLOCK() {
204204 refl::GlobalDef ().def (" relax.op.nn.prelu" , prelu);
205205}
206206
207- ffi::Expected< Type> InferTypePRelu (const CallNode* call_node) noexcept try {
207+ Type InferTypePRelu (const CallNode* call_node) {
208208 const Call call = ffi::GetRef<Call>(call_node);
209209 TensorType data_ty = GetUnaryInputTensorType (call);
210210 if (data_ty->IsUnknownNdim ()) {
@@ -220,10 +220,6 @@ ffi::Expected<Type> InferTypePRelu(const CallNode* call_node) noexcept try {
220220 NormalizeAxis (call, data_ty->ndim , attrs->axis );
221221
222222 return data_ty;
223- } catch (const ffi::Error& error) {
224- return ffi::Unexpected (error);
225- } catch (const std::exception& error) {
226- return ffi::Unexpected (ffi::Error (" InternalError" , error.what (), " " ));
227223}
228224
229225InferLayoutOutput InferLayoutPRelu (
@@ -275,7 +271,7 @@ TVM_FFI_STATIC_INIT_BLOCK() {
275271 refl::GlobalDef ().def (" relax.op.nn.softmax" , softmax);
276272}
277273
278- ffi::Expected< Type> InferTypeSoftmax (const CallNode* call_node) noexcept try {
274+ Type InferTypeSoftmax (const CallNode* call_node) {
279275 const Call call = ffi::GetRef<Call>(call_node);
280276 TensorType data_ty = GetUnaryInputTensorType (call);
281277 if (data_ty->IsUnknownNdim ()) {
@@ -294,10 +290,6 @@ ffi::Expected<Type> InferTypeSoftmax(const CallNode* call_node) noexcept try {
294290 NormalizeAxis (call, data_ty->ndim , attrs->axis );
295291
296292 return data_ty;
297- } catch (const ffi::Error& error) {
298- return ffi::Unexpected (error);
299- } catch (const std::exception& error) {
300- return ffi::Unexpected (ffi::Error (" InternalError" , error.what (), " " ));
301293}
302294
303295InferLayoutOutput InferLayoutSoftmax (
@@ -365,7 +357,7 @@ TVM_FFI_STATIC_INIT_BLOCK() {
365357 refl::GlobalDef ().def (" relax.op.nn.pad" , pad);
366358}
367359
368- ffi::Expected< Type> InferTypePad (const CallNode* call_node) noexcept try {
360+ Type InferTypePad (const CallNode* call_node) {
369361 const Call call = ffi::GetRef<Call>(call_node);
370362 ffi::Array<TensorType> input_ty = GetInputTensorType (call);
371363 const auto * attrs = call->attrs .as <PadAttrs>();
@@ -388,10 +380,6 @@ ffi::Expected<Type> InferTypePad(const CallNode* call_node) noexcept try {
388380 return TensorType (input_ty[0 ]->dtype , ndim);
389381 }
390382 return TensorType (ShapeExpr (out_shape), input_ty[0 ]->dtype );
391- } catch (const ffi::Error& error) {
392- return ffi::Unexpected (error);
393- } catch (const std::exception& error) {
394- return ffi::Unexpected (ffi::Error (" InternalError" , error.what (), " " ));
395383}
396384
397385TVM_FFI_STATIC_INIT_BLOCK () {
@@ -415,7 +403,7 @@ TVM_FFI_STATIC_INIT_BLOCK() {
415403 refl::GlobalDef ().def (" relax.op.nn.pixel_shuffle" , pixel_shuffle);
416404}
417405
418- ffi::Expected< Type> InferTypePixelShuffle (const CallNode* call_node) noexcept try {
406+ Type InferTypePixelShuffle (const CallNode* call_node) {
419407 const Call call = ffi::GetRef<Call>(call_node);
420408 ffi::Array<TensorType> input_ty = GetInputTensorType (call);
421409 const auto * attrs = call->attrs .as <PixelShuffleAttrs>();
@@ -465,10 +453,6 @@ ffi::Expected<Type> InferTypePixelShuffle(const CallNode* call_node) noexcept tr
465453 }
466454
467455 return TensorType (ShapeExpr (out_shape), input->dtype );
468- } catch (const ffi::Error& error) {
469- return ffi::Unexpected (error);
470- } catch (const std::exception& error) {
471- return ffi::Unexpected (ffi::Error (" InternalError" , error.what (), " " ));
472456}
473457
474458TVM_FFI_STATIC_INIT_BLOCK () {
@@ -989,14 +973,10 @@ TVM_FFI_STATIC_INIT_BLOCK() {
989973 refl::GlobalDef ().def (" relax.op.nn.dropout" , dropout);
990974}
991975
992- ffi::Expected< Type> InferTypeDropout (const CallNode* call_node) noexcept try {
976+ Type InferTypeDropout (const CallNode* call_node) {
993977 const Call call = ffi::GetRef<Call>(call_node);
994978 TensorType data_ty = GetUnaryInputTensorType (call);
995979 return TupleType ({data_ty, data_ty});
996- } catch (const ffi::Error& error) {
997- return ffi::Unexpected (error);
998- } catch (const std::exception& error) {
999- return ffi::Unexpected (ffi::Error (" InternalError" , error.what (), " " ));
1000980}
1001981
1002982TVM_FFI_STATIC_INIT_BLOCK () {
@@ -1314,7 +1294,7 @@ TVM_FFI_STATIC_INIT_BLOCK() {
13141294 refl::GlobalDef ().def (" relax.op.nn.batch_flatten" , batch_flatten);
13151295}
13161296
1317- ffi::Expected< Type> InferTypeBatchFlatten (const CallNode* call_node) noexcept try {
1297+ Type InferTypeBatchFlatten (const CallNode* call_node) {
13181298 const Call call = ffi::GetRef<Call>(call_node);
13191299 TensorType data_ty = GetUnaryInputTensorType (call);
13201300
@@ -1344,10 +1324,6 @@ ffi::Expected<Type> InferTypeBatchFlatten(const CallNode* call_node) noexcept tr
13441324 }
13451325
13461326 return TensorType (ShapeExpr ({batch_dim, flat_dim}), data_ty->dtype , data_ty->vdevice );
1347- } catch (const ffi::Error& error) {
1348- return ffi::Unexpected (error);
1349- } catch (const std::exception& error) {
1350- return ffi::Unexpected (ffi::Error (" InternalError" , error.what (), " " ));
13511327}
13521328
13531329TVM_FFI_STATIC_INIT_BLOCK () {
0 commit comments