Skip to content

Commit 5f12754

Browse files
committed
fix qwen2_vl in orange pi
1 parent b0ff5a6 commit 5f12754

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

mindnlp/core/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
from ._bind import get_default_dtype, set_default_dtype, get_default_device
5454
from .amp import autocast, GradScaler
5555
from .func import vmap
56+
from .configs import set_pyboost
5657

5758
from . import profiler, cuda, optim, amp, compiler, jit, version, __future__, overrides, \
5859
return_types, linalg, fx, backends, testing, nn, fft, _jit_internal, utils

mindnlp/core/nn/functional.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ def conv3d(input, weight, bias=None, stride=1, padding=0, dilation=1, groups=1):
849849
mode=1,
850850
pad_mode=pad_mode,
851851
pad=pad,
852-
stride=stride,
852+
stride=tuple(stride),
853853
dilation=dilation,
854854
group=groups)
855855
output = conv3d_op(input, weight)

mindnlp/core/ops/comparison.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def sort(input, *, dim=-1, descending=False, stable=False):
183183
# topk
184184
has_topk = hasattr(mindspore.mint, 'topk')
185185
def topk(input, k, dim=-1, largest=True, sorted=True):
186-
if use_pyboost() and has_topk:
186+
if use_pyboost() and has_topk and not ON_ORANGE_PI:
187187
out = mindspore.mint.topk(input, int(k), dim, largest, sorted)
188188
else:
189189
out = ops.topk(input, k, dim, largest, sorted)

mindnlp/core/ops/pointwise.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,9 @@ def erfc(input, *, out=None):
334334

335335

336336
def erfinv(input, *, out=None):
337+
if ON_ORANGE_PI:
338+
return erfinv_torch(input)
337339
if use_pyboost() and has_erfinv:
338-
if ON_ORANGE_PI:
339-
return erfinv_torch(input)
340340
return call_ms_func(mindspore.mint.erfinv, input, out=out)
341341
return call_ms_func(ops.erfinv, input, out=out)
342342

0 commit comments

Comments
 (0)