当前位置:网站首页>pycuda._ driver. LogicError: explicit_ context_ dependent failed: invalid device context - no currently
pycuda._ driver. LogicError: explicit_ context_ dependent failed: invalid device context - no currently
2022-07-03 22:19:00 【AI Hao】
In execution tensorRT There was a mistake in reasoning , The details are as follows :
D:\cv\ConNext_demo\testtrt.py:32: DeprecationWarning: Use set_optimization_profile_async instead.
context.active_optimization_profile = 0
Traceback (most recent call last):
File "D:\cv\ConNext_demo\testtrt.py", line 37, in <module>
d_input = cuda.mem_alloc(image.nbytes) # Allocate input memory .
pycuda._driver.LogicError: explicit_context_dependent failed: invalid device context - no currently active context?
This is a pycuda Not initialized , Just execute initialization :
import pycuda.driver as cuda
import pycuda.autoinit
import pycuda.autoinit This line is gray , It feels useless , But if there is no such sentence, the above error will be reported .
边栏推荐
- Can you draw with turtle?
- Why should enterprises do more application activities?
- Cesium terrain clipping draw polygon clipping
- string
- 320. Energy Necklace (ring, interval DP)
- 2 spark environment setup local
- 1068. Consolidation of ring stones (ring, interval DP)
- Data consistency between redis and database
- Control loop of program (while loop)
- Buuctf, misc: n solutions
猜你喜欢
[dynamic planning] counting garlic customers: the log of garlic King (the longest increasing public subsequence)
Exclusive interview with the person in charge of openkruise: to what extent has cloud native application automation developed now?
Collection | pytoch common loss function disassembly
gslb(global server load balance)技術的一點理解
Leetcode week 4: maximum sum of arrays (shape pressing DP bit operation)
Unique in China! Alibaba cloud container service enters the Forrester leader quadrant
[SRS] build a specified version of SRS
3 environment construction -standalone
Control loop of program (while loop)
The overseas listing of Shangmei group received feedback, and brands such as Han Shu and Yiye have been notified for many times and received attention
随机推荐
[Android reverse] application data directory (files data directory | lib application built-in so dynamic library directory | databases SQLite3 database directory | cache directory)
The latest analysis of R1 quick opening pressure vessel operation in 2022 and the examination question bank of R1 quick opening pressure vessel operation
How PHP drives mongodb
Control loop of program (while loop)
Data consistency between redis and database
2022 free examination questions for safety management personnel of hazardous chemical business units and reexamination examination for safety management personnel of hazardous chemical business units
Why use pycharm to run the use case successfully but cannot exit?
Redis single thread and multi thread
Sed、Awk
Dahua series books
国泰君安证券开户是安全可靠的么?怎么开国泰君安证券账户
JS Demo calcule combien de jours il reste de l'année
Luogu deep foundation part 1 Introduction to language Chapter 7 functions and structures
Development trend and market demand analysis report of China's energy storage battery industry Ⓩ 2022 ~ 2028
Kali2021.4a build PWN environment
Programming language (2)
1 Introduction to spark Foundation
DR-NAS26-Qualcomm-Atheros-AR9582-2T-2R-MIMO-802.11-N-5GHz-high-power-Mini-PCIe-Wi-Fi-Module
Blue Bridge Cup Guoxin Changtian single chip microcomputer -- led lamp module (V)
Niuke winter vacation training camp 4 g (enumeration optimization, Euler power reduction)