Call aclrtCreateContext failed and Runtime error for null exception handler

一、问题现象(附报错日志上下文):

[WARNING] ME(366054,7f83fbb010,tensor_add_sample):2023-07-28-11:57:46.590.083 [mindspore/ccsrc/cxx_api/model/acl/model_converter.cc:40] ClearCurrentRtCtx] Call aclrtCreateContext failed, ret = 507033 [ERROR] CORE(366054,7f83fbb010,tensor_add_sample):2023-07-28-11:58:01.132.839 [mindspore/core/utils/log_adapter.cc:392] operator^] Runtime error for null exception handler. terminate called after throwing an instance of 'std::runtime_error' what(): Device 0 call aclrtSetDevice failed, ret[507033]

C++ Call Stack: (For framework developers) mindspore/ccsrc/cxx_api/graph/acl/acl_graph_impl.cc:111 InitEnv

已放弃

二、软件版本:

-- CANN 版本 (Ascend-cann-nnae_6.3.RC1.alpha001_linux-aarch64.run、Ascend-cann-kernels-310p_6.3.RC2.alpha001_linux.run、Ascend-cann-toolkit_6.3.RC1.alpha001_linux-aarch64.run) --Tensorflow/Pytorch/MindSpore 版本:MindSpore2.0.1 --Python 版本 (3.8.2): --操作系统版本 (Kylin-Desktop-V10-SP1-OEM-X100-20211117-arm64):

三、测试步骤:

  1. wget https://obs.dualstack.cn-north-4.myhuaweicloud.com/mindspore-website/sample_resources/ascend310_single_op_sample.zip
  2. unzip ascend310_single_op_sample.zip && cd ascend310_single_op_sample
  3. cmake . -DMINDPSORE_APTH=/root/midnspore/mindspore_ascend-2.0.1-linux_aarch64
  4. make
  5. export ASCEND_SLOG_PRINT_TO_STDOUT=1 export ASCEND_GLOBAL_LOG_LEVEL=1
  6. ./tensor_add_sample

四、日志信息:

https://gitee.com/ZCKX/test/blob/master/log.t

****************************************************解答*****************************************************

这个问题已经解决了,原因是没有链接python库,我修改了测试用例中的CMakeList.txt,查找python库并将之链接到可执行程序上,修改前后cmake如下图:

输入图片说明


运行时报了新的错误

输入图片说明

Running wrapper {"command": "/opt/conda/bin/python3 -u /opt/nuclio/_nuclio_wrapper.py --handler main:handler --socket-path /tmp/nuclio-rpc-cipbe4b85k6ne6scq1gg.sock --platform-kind local --namespace nuclio --worker-id 0 --trigger-kind http --trigger-name myHttpTrigger --decode-event-strings"} /opt/nuclio/_nuclio_wrapper.py:395: DeprecationWarning: There is no current event loop loop = asyncio.get_event_loop() {"datetime": "2023-07-15 15:11:13,541", "level": "error", "message": "Caught unhandled exception while initializing", "with": {"err": "'return' outside function (main.py, line 64)", "traceback": "Traceback (most recent call last):\n File \"/opt/nuclio/_nuclio_wrapper.py\", line 400, in run_wrapper\n wrapper_instance = Wrapper(root_logger,\n File \"/opt/nuclio/_nuclio_wrapper.py\", line 71, in __init__\n self._entrypoint = self._load_entrypoint_from_handler(handler)\n File \"/opt/nuclio/_nuclio_wrapper.py\", line 195, in _load_entrypoint_from_handler\n module = __import__(module_name)\n File \"/opt/nuclio/main.py\", line 64\n return context.Response(body=json.dumps(results), headers={},\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nSyntaxError: 'return' outside function\n", "worker_id": "0"}} 23.07.15 15:11:13.550 sor.http.w0.python.logger (E) Unexpected termination of child process {"error": null, "status": "exit status 1"} panic: Wrapper process for worker 0 exited unexpectedly with: exit status 1 goroutine 13 [running]: github.com/nuclio/nuclio/pkg/processor/runtime/rpc.(*AbstractRuntime).watchWrapperProcess(0xc0007f4300) /nuclio/pkg/processor/runtime/rpc/abstract.go:471 +0x445 created by github.com/nuclio/nuclio/pkg/processor/runtime/rpc.(*AbstractRuntime).startWrapper /nuclio/pkg/processor/runtime/rpc/abstract.go:244 +0x1c5 /nuclio/pkg/platform/local/platform.go:1168 Failed to deploy function ...//nuclio/pkg/platform/abstract/platform.go:197
最新发布
07-16
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值