Skip to content

Commit 2c55a64

Browse files
huangyunlongit-is-a-robot
huangyunlong
authored andcommitted
!16054 Do not warn if ACL_DEVICE_SYNC_TIMEOUT is not configured.
Merge pull request !16054 from huangyunlong/2.6warn
1 parent 5d6e467 commit 2c55a64

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

torch_npu/csrc/core/npu/interface/AclInterface.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,9 @@ aclError AclrtSynchronizeDeviceWithTimeout(void)
656656
if (func != nullptr) {
657657
return func(timeout);
658658
} else {
659-
TORCH_NPU_WARN_ONCE(func, "Failed to find function ", "aclrtSynchronizeDeviceWithTimeout");
659+
if (timeout > 0) {
660+
TORCH_NPU_WARN_ONCE("The ACL_DEVICE_SYNC_TIMEOUT does not take effect. If you want to enable this env, please upgrade CANN to the matching version.");
661+
}
660662
typedef aclError (*AclrtSynchronizeDevice)(void);
661663
static AclrtSynchronizeDevice func_backup = nullptr;
662664
if (func_backup == nullptr) {

0 commit comments

Comments
 (0)