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

本站现有博文332篇,共被浏览899879

本站已经建立2600天!

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