Skip to content

Commit

Permalink
Merge pull request #2804 from alibaba/feature/metalbugfix
Browse files Browse the repository at this point in the history
Fix bug for metal run for fp16 model
  • Loading branch information
jxt1234 authored Mar 26, 2024
2 parents ffde3f4 + 7f65266 commit 2d926e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/backend/metal/MetalConvolutionCommon.mm
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ void weightInBlock(int group, int oc, int ic, int kh, int kw, const FType *src,
auto ic = size / kw / kh / (oc / group);

// convert
if (loadWeightInt8) {
if (loadWeightInt8 && qnt->weight.get() != nullptr) {
auto backend = static_cast<MetalBackend *>(this->backend());
mWeight = weightTransform(group, oc, ic, kh, kw, (float*)qnt->weight.get(), !qnt->canUseInt4, qnt->canUseInt4);
auto dequantParams = getDequantScale(qnt->alpha.get(), qnt->alpha.size(), backend, qnt->asymmetric);
Expand Down

0 comments on commit 2d926e4

Please sign in to comment.