Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented override for Cuda device instruction set. #931

Merged
merged 1 commit into from
Feb 15, 2023

Conversation

MoFtZ
Copy link
Collaborator

@MoFtZ MoFtZ commented Feb 14, 2023

This PR attempts to deal with the issue of newly introduced Cuda Instruction Sets that are unknown at the time ILGPU was compiled and published to Nuget (see #880).

Using the RTX 4090 as an example, Nvidia introduced SM 9.0 and ISA 7.8. The architecture SM 9.0 can be determined by querying the device at runtime, so that's fine. However, the instruction set ISA 7.8 is unknown to ILGPU, and cannot be determined at runtime.

This PR introduces a new overload to the Cuda() method when configuring a Context that allows the caller to force the device to use a specific instruction set. This should hopefully make ILGPU versions usable as new Cuda devices are released, without forcing developers to update to the latest version of ILGPU.

// Force all Cuda devices to use ISA 7.8
using var context = Context.Create(builder => builder.Cuda(overridableDevice => overridableDevice.InstructionSet = new CudaInstructionSet(7, 8)));

@m4rs-mt m4rs-mt added this to the v1.4 milestone Feb 15, 2023
@m4rs-mt m4rs-mt merged commit 0a23d53 into m4rs-mt:master Feb 15, 2023
@MoFtZ MoFtZ deleted the feature/override-cuda-isa branch February 15, 2023 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants