cuModuleGetSurfRef和cuModuleGetTexRef的替代方法是什么?

huangapple go评论53阅读模式
英文:

What's the replacement for cuModuleGetSurfRef and cuModuleGetTexRef?

问题

CUDA 12 表示这两个函数已弃用:

CUresult cuModuleGetSurfRef (CUsurfref* pSurfRef, CUmodule hmod, const char* name);
CUresult cuModuleGetTexRef (CUtexref* pTexRef, CUmodule hmod, const char* name);

这两个函数用于从已加载的模块中获取表面或纹理的引用。它们已被弃用。

它们被弃用,用什么代替?模块中的表面和纹理将以不同方式访问吗?它们将完全不在模块中吗?如果是后者,如何使用CUDA驱动程序API与它们一起工作?

英文:

CUDA 12 indicates that these two functions:

CUresult cuModuleGetSurfRef (CUsurfref* pSurfRef, CUmodule hmod, const char* name);
CUresult cuModuleGetTexRef (CUtexref* pTexRef, CUmodule hmod, const char* name);

which obtain a reference to surface or a texture, respectively, from a loaded module - are deprecated.

What are they deprecated in favor of? Are surfaces and textures in modules to be accessed differently? Will they be entirely out of modules? If it's the latter, how would one work with them using the CUDA driver API?

答案1

得分: 1

根据 @talonmies 的评论,看起来 "replacement" 是 "纹理对象""表面对象"。根据 API 中明显的区别,主要是新的 "对象" 具有更少的 API 调用,这些调用包含更丰富的描述符。因此,用户自己设置字段,而不需要大量的 cuTexRefGetXXXXcuTexRefSetXXXX 调用。还有 "张量映射对象",从计算能力 9.0 及更高版本开始出现。

英文:

So, based on @talonmies' comment, it seems the "replacement" are "texture objects" and "surface objects". The main difference - as far as is evident in the API - is that the new "objects" have less API calls, which take richer descriptors. Thus, the user sets fields themselves, and does not need the large number of cuTexRefGetXXXX and cuTexRefSetXXXX calls. There are also "tensor map objects", appearing with Compute Capability 9.0 and later.

huangapple
  • 本文由 发表于 2023年2月19日 15:54:34
  • 转载请务必保留本文链接:https://go.coder-hub.com/75498717.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定