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

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

本站已经建立2493天!

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