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

本站现有博文337篇,共被浏览961712次

本站已经建立2673天!

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