Table of Contents

Class CudaDriverModule

Namespace
JYPPX.CudaSharp
Assembly
JYPPX.CudaSharp.dll

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

int

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

kernelName string
configuration CudaKernelLaunchConfiguration
stream CudaStream
arguments CudaKernelArgument[]

Returns

CudaDriverKernelLaunch

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

code byte[]
deviceOrdinal int

Returns

CudaDriverModule

LoadFromFile(string, int)

Loads copied PTX or CUBIN bytes from a file. 从文件加载复制型 PTX 或 CUBIN bytes。

public static CudaDriverModule LoadFromFile(string path, int deviceOrdinal = 0)

Parameters

path string
deviceOrdinal int

Returns

CudaDriverModule