如何以编程方式确定 GPU 的内存总线宽度和时钟速率?
如何以编程方式确定 GPU 的内存总线宽度和内存时钟速率?我想使用这些数字来计算最大理论内存带宽。我最感兴趣的是 NVIDIA GPU。
How can I programmatically determine a GPU's memory bus width and memory clock rate? I want to use these numbers to compute the maximum theoretical memory bandwidth. I'm mostly interested in NVIDIA GPUs.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不知道内存总线宽度,但是 cudaGetDeviceProperties 可以返回有关 NVIDIA GPU 时钟频率的信息。
I don't know about memory bus width, but cudaGetDeviceProperties can return you information about the clock rate of an NVIDIA GPU.
也许查询卡上的制造商和型号并从制造商的网站上抓取数据?但说实话,除非驱动程序在 API 调用中公开这些值,否则很难确定。也许如果您可以编写一些在裸硬件上独立运行的东西,您就可以做到,但否则您将与系统上的所有其他进程竞争总线带宽和 CPU 时间,从而使测量变得非常棘手。
Maybe query the card for manufacturer and model number and scrape the data from the manufacturer's website? Seriously, though, unless the driver exposes those values in an API call it'll be very difficult to determine. Maybe if you can write something to run standalone on the bare hardware you could do it, but otherwise you're going to be competing with every other process on the system for bus bandwidth and CPU time, making measurements pretty tricky.