mirror of https://github.com/Jittor/Jittor
shut off sync expect reduce op
This commit is contained in:
parent
c3b1f380eb
commit
64e3ceb59e
|
@ -9,7 +9,7 @@
|
|||
# file 'LICENSE.txt', which is part of this source code package.
|
||||
# ***************************************************************
|
||||
|
||||
__version__ = '1.3.2415.29'
|
||||
__version__ = '1.3.24151231.29'
|
||||
from jittor_utils import lock
|
||||
with lock.lock_scope():
|
||||
ori_int = int
|
||||
|
|
|
@ -619,10 +619,10 @@ namespace jittor
|
|||
CHECK_RET(ret == ACL_SUCCESS, LOG_PRINT("%s: aclnnxxx failed. ERROR: %d\n", name.c_str(), ret); return);
|
||||
|
||||
// 6. (固定写法)同步等待任务执行结束
|
||||
if(sync_run) {
|
||||
ret = aclrtSynchronizeStream(aclstream);
|
||||
CHECK_RET(ret == ACL_SUCCESS, LOG_PRINT("%s: aclrtSynchronizeStream failed. ERROR: %d\n", name.c_str(), ret); return);
|
||||
}
|
||||
// if(sync_run) {
|
||||
// ret = aclrtSynchronizeStream(aclstream);
|
||||
// CHECK_RET(ret == ACL_SUCCESS, LOG_PRINT("%s: aclrtSynchronizeStream failed. ERROR: %d\n", name.c_str(), ret); return);
|
||||
// }
|
||||
|
||||
// 6. 释放aclTensor和aclScalar,需要根据具体API的接口定义修改
|
||||
// destroy tensor
|
||||
|
|
|
@ -116,7 +116,7 @@ namespace jittor
|
|||
ret = it->second.executeFunc(workspaceAddr, workspaceSize, executor, aclstream);
|
||||
CHECK_RET(ret == ACL_SUCCESS, LOG_PRINT("%s: aclnnxxx failed. ERROR: %d\n", name.c_str(), ret); return);
|
||||
|
||||
syncRun();
|
||||
//syncRun();
|
||||
|
||||
aclDestroyScalar(alpha);
|
||||
return;
|
||||
|
|
|
@ -72,6 +72,6 @@ namespace jittor
|
|||
}
|
||||
ret = aclnnBatchMatMul(workspaceAddr, workspaceSize, executor, aclstream);
|
||||
CHECK_RET(ret == ACL_SUCCESS, LOG_PRINT("%s: aclnnbatchMatmul failed. ERROR: %d\n", name.c_str(), ret); return);
|
||||
syncRun();
|
||||
// syncRun();
|
||||
}
|
||||
}
|
|
@ -66,7 +66,7 @@ namespace jittor
|
|||
ret = aclnnConvolution(workspaceAddr, workspaceSize, executor, aclstream);
|
||||
CHECK_RET(ret == ACL_SUCCESS, LOG_PRINT("%s: aclnnxxx failed. ERROR: %d\n", name.c_str(), ret); return);
|
||||
|
||||
syncRun();
|
||||
// syncRun();
|
||||
|
||||
aclDestroyIntArray(strides);
|
||||
aclDestroyIntArray(pads);
|
||||
|
|
|
@ -162,7 +162,9 @@ namespace jittor
|
|||
ret = aclnnStridedSliceAssignV2(workspaceAddr, workspaceSize, executor, aclstream);
|
||||
CHECK_RET(ret == ACL_SUCCESS, LOG_PRINT("%s: aclnnStridedSliceAssignV2 failed. ERROR: %d\n", name.c_str(), ret); return);
|
||||
|
||||
syncRun();
|
||||
// syncRun();
|
||||
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -72,6 +72,6 @@ namespace jittor
|
|||
}
|
||||
ret = aclnnMatmul(workspaceAddr, workspaceSize, executor, aclstream);
|
||||
CHECK_RET(ret == ACL_SUCCESS, LOG_PRINT("%s: aclnnMatmul failed. ERROR: %d\n", name.c_str(), ret); return);
|
||||
syncRun();
|
||||
// syncRun();
|
||||
}
|
||||
}
|
|
@ -76,7 +76,7 @@ namespace jittor
|
|||
{
|
||||
LOGf << "Not supported random type : " << name;
|
||||
}
|
||||
syncRun();
|
||||
// syncRun();
|
||||
return;
|
||||
}
|
||||
}
|
|
@ -77,7 +77,7 @@ namespace jittor
|
|||
ret = aclnnIndexPutImpl(workspaceAddr, workspaceSize, executor, aclstream);
|
||||
CHECK_RET(ret == ACL_SUCCESS, LOG_PRINT("%s: aclnnIndexPutImpl failed. ERROR: %d\n", name.c_str(), ret); return);
|
||||
|
||||
syncRun();
|
||||
// syncRun();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace jittor
|
|||
|
||||
ret = aclnnSWhere(workspaceAddr, workspaceSize, executor, aclstream);
|
||||
CHECK_RET(ret == ACL_SUCCESS, LOG_PRINT("%s: aclnnxxx failed. ERROR: %d\n", name.c_str(), ret); return);
|
||||
syncRun();
|
||||
//syncRun();
|
||||
return;
|
||||
}
|
||||
}
|
|
@ -53,7 +53,7 @@ namespace jittor
|
|||
|
||||
ret = it->second.executeFunc(workspaceAddr, workspaceSize, executor, aclstream);
|
||||
CHECK_RET(ret == ACL_SUCCESS, LOG_PRINT("%s: aclnnxxx failed. ERROR: %d\n", name.c_str(), ret); return);
|
||||
syncRun();
|
||||
//syncRun();
|
||||
return;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue