Skip to content

Commit

Permalink
Merge pull request #3135 from alibaba/feature/bugfix
Browse files Browse the repository at this point in the history
Feature/bugfix
  • Loading branch information
jxt1234 authored Dec 22, 2024
2 parents 3ee08ac + e6180bd commit bbf1a93
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions source/backend/opencl/core/runtime/OpenCLRuntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,12 @@ OpenCLRuntime::OpenCLRuntime(const BackendConfig::PrecisionMode precision, const

}else{
mIsCreateError = true;
MNN_ASSERT(1 <= gpuDevices.size());
}
}else{
mIsCreateError = true;
MNN_ASSERT(platforms.size() > 0);
}
if (mIsCreateError) {
return;
}
{
// Init info
Expand Down
2 changes: 1 addition & 1 deletion tools/converter/source/optimizer/onnxextra/OnnxPrelu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class OnnxTriluTransform : public OnnxExtraManager::Transform {
}
auto k = (inputs.size() == 2 ? inputs[1] : _Scalar<int>(0));
auto mask = (upper ? _GreaterEqual(rangeW, rangeH + k) : _GreaterEqual(rangeH, rangeW - k));
mask = _Reshape(mask, _Concat({_Fill(_Size(shape) - _Scalar<int>(2), oneV), _Shape(mask)}, 0));
mask = _Reshape(mask, _Concat({_Fill(_Unsqueeze(_Size(shape) - _Scalar<int>(2), {0}), oneV), _Shape(mask)}, 0));
auto res = _Select(mask, inputs[0], zero);
res->setName(expr->outputName(0));
return res->expr().first;
Expand Down

0 comments on commit bbf1a93

Please sign in to comment.