Class CudaDriverModule
Owns a CUDA Driver module loaded from copied code bytes. 拥有从复制型 code bytes 加载的 CUDA Driver module。
public sealed class CudaDriverModule : IDisposable
- Inheritance
-
CudaDriverModule
- Implements
- Inherited Members
Properties
DeviceOrdinal
Gets the device ordinal whose primary context owns this module. 获取拥有此 module 的 device ordinal。
public int DeviceOrdinal { get; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Launch(string, CudaKernelLaunchConfiguration, CudaStream, params CudaKernelArgument[])
Launches a named function with copied scalar and owner-bound device-memory arguments. 使用复制型标量和 owner-bound device-memory 参数启动 named function。
public CudaDriverKernelLaunch Launch(string kernelName, CudaKernelLaunchConfiguration configuration, CudaStream stream, params CudaKernelArgument[] arguments)
Parameters
kernelNamestringconfigurationCudaKernelLaunchConfigurationstreamCudaStreamargumentsCudaKernelArgument[]
Returns
Remarks
The returned owner leases this module, stream, and every device-memory argument until disposal. 返回 owner 会在释放前租住 module、stream 和所有 device-memory 参数。
Load(byte[], int)
Loads copied PTX or CUBIN bytes into the selected device primary context. 将复制型 PTX 或 CUBIN bytes 加载到指定 device primary context。
public static CudaDriverModule Load(byte[] code, int deviceOrdinal = 0)
Parameters
Returns
LoadFromFile(string, int)
Loads copied PTX or CUBIN bytes from a file. 从文件加载复制型 PTX 或 CUBIN bytes。
public static CudaDriverModule LoadFromFile(string path, int deviceOrdinal = 0)