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

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

本站已经建立2669天!

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