FB 建議貼文

選取貼文複製成功(包含文章連結)!

NVIDIA 為其專有的 CUDA 架構帶來原生的 Python 支援,幫助開發者加速 AI 開發

NVIDIA 為其專有的 CUDA 架構帶來原生的 Python 支援,幫助開發者加速 AI 開發

ADVERTISEMENT

CUDA 是 NVIDIA 專有的 GPU 平行運算架構,專有意味著並非開源,因此在軟體開發和支援方面都由 NVIDIA 自己作主。在沒有開源社群參與的情況下,CUDA 也存在諸多限制,例如並沒有原生支援 Python。

不過在最近舉辦的 GPU 技術大會上,NVIDIA 宣布 CUDA 軟體工具包原生支援 Python,而先前 CUDA 主要依賴於 C 語言和 C++ 語言,而 Python 則是目前非常流行的程式開發語言。

NVIDIA 為其專有的 CUDA 架構帶來原生的 Python 支援,幫助開發者加速 AI 開發

根據 GitHub 2024 年開源數據調查,Python 在 2024 年已經超過 JavaScript 成為全球最受歡迎的程式語言。Python 在資料科學、機器學習和高效能運算領域佔據著主導地位,但長期以來 CUDA 對 Python 的支援僅停留在工具層面,開發者需要掌握 C++ 或 Fortran 等語言才能直接操作 CUDA 進行 GPU 程式,顯然這種壁壘肯定會限制 CUDA 在 Python 開發者社群中的普及。

NVIDIA CUDA 架構師在 GPU 技術大會上表示:「我們一直在努力將加速 Python 運算導入 CUDA 技術堆疊,讓 Python 支援成為一流支援。新的 CUDA Python 支援並非簡單地將 C 語言翻譯為 Python,而是為 Python 開發者量身打造的 Pythonic 體驗,確保能夠自然融入到 Python 開發流程。」

CUDA Python 核心特性包括:

  • CUDA Core: 對 CUDA Runtime 的 Pythonic 重新構想,CUDA Core 完全採用 Python 的執行流程,深度整合了 JIT Compilation。開發者不需要呼叫外部命令列編譯器即可完成 GPU 運算,這種設計顯著減少了依賴項並提升了開發效率。
  • cuPyNumeric 函式庫: 這是一個與 NumPy 相容的函式庫,開發者只需要更改一行導入指令,即可將原本執行在 CPU 上的 NumPy 程式碼遷移到 GPU 上執行。該函式庫為資料科學和機器學習開發者提供無縫的過渡體驗。
  • 統一的 API 介面: CUDA Python 提供了一套標準的低階介面,涵蓋 CUDA 主機 API 的全部功能。這種統一程式碼不僅可以提高程式碼的可移植性,還增強了不同加速函式庫之間的互操作性。

對開發者來說這是個非常好的消息,特別是對 AI 和機器學習開發者來說是重大利多。許多 ML 開發者使用 Python,現在這些開發者不需要再學習 C/C++ 即可充分利用 GPU 硬體。當然,NVIDIA 支援 Python 也會鞏固 NVIDIA 在資料中心 GPU 市場的領先地位。

另外,NVIDIA 還計劃在未來支援更多程式語言。早在 2024 年 GPU 技術大會上,NVIDIA 工程師就表示 NVIDIA 還在探索諸如 Rust 和 Julia 等程式開發語言,以吸引更廣泛的開發者群體。

相關資源:https://github.com/NVIDIA/cuda-python

NetEase
作者

網易科技,有態度的科技門戶!關注微信公眾號(tech_163),看有態度的深度內容。

使用 Facebook 留言
RobertElrod
1.  RobertElrod (發表於 2025年4月16日 10:05)
Great news! Native Python support in CUDA will significantly speed up AI development workflows. This simplifies code and eliminates unnecessary layers. Imagine less time wrestling with wrappers and more time training models. Speaking of time, I remember the frustration of mastering flappy bird - maybe CUDA's python support can help develop AI to finally conquer it!
Wong
1人給推

2.  Wong (發表於 2025年4月16日 11:22)
[url=https://snowrider3dd.github.io]Snow Rider 3d[/url] is one of the most interesting games to enjoy during your free time. According to the growing trend of programming languages in 2024, Python is gaining more popularity among developers, especially in fields like data science and machine learning. With NVIDIA's enhanced support for CUDA Python, developers now have efficient tools to work seamlessly. Meanwhile, similar to how engaging activities like playing Snow Rider 3D offer enjoyment, NVIDIA ensures productivity for developers.

Wong
3.  Wong (發表於 2025年4月16日 11:23)
※ 引述《Wong》的留言:
Snow Rider 3d is one of the most interesting games to enjoy during your free time. According to the growing trend of programming languages in 2024, Python is gaining more popularity among developers, especially in fields like data science and machine learning. With NVIDIA's enhanced support for CUDA Python, developers now have efficient tools to work seamlessly. Meanwhile, similar to how engaging activities like playing Snow Rider 3D offer enjoyment, NVIDIA ensures productivity for developers.
>
>
發表回應
謹慎發言,尊重彼此。按此展開留言規則