mirror of https://github.com/Jittor/Jittor
Merge branch 'master' of https://github.com/jittor/jittor
This commit is contained in:
commit
dd6394e656
|
@ -8,7 +8,7 @@
|
|||
# This file is subject to the terms and conditions defined in
|
||||
# file 'LICENSE.txt', which is part of this source code package.
|
||||
# ***************************************************************
|
||||
__version__ = '1.2.2.44'
|
||||
__version__ = '1.2.2.45'
|
||||
from . import lock
|
||||
with lock.lock_scope():
|
||||
ori_int = int
|
||||
|
|
|
@ -180,7 +180,7 @@ def _setitem_old(x, slices, value):
|
|||
def getitem(x, slices):
|
||||
if isinstance(slices, jt.Var) and slices.dtype == "bool":
|
||||
return getitem(x, slices.where())
|
||||
if isinstance(slices, Sequence):
|
||||
if isinstance(slices, tuple):
|
||||
ss = []
|
||||
for s in slices:
|
||||
if isinstance(s, jt.Var) and s.dtype == "bool":
|
||||
|
@ -193,7 +193,7 @@ def getitem(x, slices):
|
|||
def setitem(x, slices, value):
|
||||
if isinstance(slices, jt.Var) and slices.dtype == "bool":
|
||||
slices = tuple(slices.where())
|
||||
elif isinstance(slices, Sequence):
|
||||
elif isinstance(slices, tuple):
|
||||
ss = []
|
||||
for s in slices:
|
||||
if isinstance(s, jt.Var) and s.dtype == "bool":
|
||||
|
|
|
@ -81,8 +81,8 @@ void ArrayOp::jit_prepare(JK& jk) {
|
|||
|
||||
// fill or find cbuffer for const var pass
|
||||
if (output->dtype().dsize() == 4) {
|
||||
auto x = abs(ptr<int32>()[0]);
|
||||
auto y = abs(ptr<float32>()[0]);
|
||||
auto x = std::abs(ptr<int32>()[0]);
|
||||
auto y = std::abs(ptr<float32>()[0]);
|
||||
auto z = ptr<uint32>()[0];
|
||||
if ((x<=2) || (y==1.0f || y==2.0f))
|
||||
jk << _CS("[o:") << z << ']';
|
||||
|
|
Loading…
Reference in New Issue