EADST

ONNX Set Device ID with CUDA

ONNX Set the Device ID with CUDA

import onnxruntime as ort

model_path = ''

providers = [
    ('CUDAExecutionProvider', {
        'device_id': 0,
        'arena_extend_strategy': 'kNextPowerOfTwo',
        'gpu_mem_limit': 2 * 1024 * 1024 * 1024,
        'cudnn_conv_algo_search': 'EXHAUSTIVE',
        'do_copy_in_default_stream': True,
    }),
    'CPUExecutionProvider',
]

session = ort.InferenceSession(model_path, providers=providers)

Reference:

CUDA Execution Provider

相关标签
About Me
XD
Goals determine what you are going to be.
Category
标签云
HaggingFace Land Firewall WAN Shortcut Web Gemma hf git-lfs SQLite Hungarian RAR 搞笑 Diagram NameSilo PyTorch Domain Pickle NLP Miniforge Transformers 音频 DeepStream SAM Tracking 证件照 Color 图标 GGML News Paddle Logo Streamlit HuggingFace Disk 飞书 DeepSeek 图形思考法 tar VPN VGG-16 OpenCV VSCode mmap Cloudreve Github LLM Claude Attention Hotel 公式 Llama FastAPI Animate 顶会 InvalidArgumentError OCR UI git Review logger XML 多线程 SPIE Sklearn transformers Windows CTC Qwen 关于博主 GoogLeNet JSON AI PDF Interview C++ CEIR PyCharm NLTK Anaconda XGBoost 财报 FP8 ONNX Bert BF16 MD5 SVR Markdown diffusers LoRA 签证 Algorithm Freesound TensorRT BTC Qwen2.5 Image2Text LLAMA Tensor Clash Pytorch Ptyhon Statistics FP16 GPT4 Mixtral COCO scipy Baidu Pillow EXCEL printf 净利润 Qwen2 Jupyter PDB 继承 云服务器 Datetime Pandas TensorFlow TTS Linux 多进程 BeautifulSoup Proxy Breakpoint Knowledge Conda Numpy uwsgi CLAP Use Google Magnet Plate CV UNIX Website ResNet-50 Docker Paper 算法题 Augmentation llama.cpp Vim 腾讯云 CC icon Plotly 第一性原理 Safetensors Search GIT LeetCode Bipartite Crawler Nginx 报税 torchinfo v0.dev 域名 Video 递归学习法 uWSGI IndexTTS2 TSV v2ray ModelScope WebCrawler CAM FP64 Quantize SQL Python Food PIP Heatmap CUDA Dataset Quantization YOLO Vmess RGB ChatGPT Git FlashAttention Excel Input Bitcoin Django Password Ubuntu Template LaTeX Distillation OpenAI Base64 Math Michelin Zip Bin GPTQ Tiktoken Jetson Rebuttal CSV Random API FP32 Card Agent Translation Permission Data 版权 强化学习 Hilton tqdm QWEN 阿里云
站点统计

本站现有博文323篇,共被浏览795742

本站已经建立2493天!

热门文章
文章归档
回到顶部