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

CUDA tests are broken on .NET 7.0.400 #1047

Closed
jgiannuzzi opened this issue Aug 15, 2023 · 1 comment · Fixed by #1050
Closed

CUDA tests are broken on .NET 7.0.400 #1047

jgiannuzzi opened this issue Aug 15, 2023 · 1 comment · Fixed by #1050
Labels
Milestone

Comments

@jgiannuzzi
Copy link
Contributor

The CUDA tests for ILGPU are broken when building with the .NET 7.0.400 SDK, no matter which runtime is targeted. Here is a failure example, which gives the following stack trace:

[xUnit.net 00:00:16.97]     ILGPU.Tests.Cuda.CudaArrayViews_Release.ArrayViewValid(length: 8197) [FAIL]
  Failed ILGPU.Tests.Cuda.CudaArrayViews_Release.ArrayViewValid(length: 8197) [12 ms]
  Error Message:
   ILGPU.InternalCompilerException : An internal compiler error has been detected
---- System.AggregateException : One or more errors occurred. (The function 'Add' does not have an intrinsic implementation for this backend. 'EnableAlgorithms' from the Algorithms library not invoked?)
-------- ILGPU.Backends.NotSupportedIntrinsicException : The function 'Add' does not have an intrinsic implementation for this backend. 'EnableAlgorithms' from the Algorithms library not invoked?
  Stack Trace:
     at ILGPU.Backends.Backend.Compile[TBackendHook](Method kernelMethod, EntryPointDescription& entry, KernelSpecialization& specialization, TBackendHook backendHook) in /_/Src/ILGPU/Backends/Backend.cs:line 725
   at ILGPU.Backends.Backend.Compile[TBackendHook](EntryPointDescription& entry, KernelSpecialization& specialization, TBackendHook backendHook) in /_/Src/ILGPU/Backends/Backend.cs:line 643
   at ILGPU.Backends.Backend.Compile(EntryPointDescription& entry, KernelSpecialization& specialization) in /_/Src/ILGPU/Backends/Backend.cs:line 625
   at ILGPU.Tests.TestBase.Execute[TIndex](MethodInfo kernel, TIndex dimension, Object[] arguments) in /home/runner/runner/_work/ILGPU/ILGPU/Src/ILGPU.Tests/Generic/TestBase.cs:line 150
   at ILGPU.Tests.TestBase.Execute[TIndex](TIndex dimension, Object[] arguments) in /home/runner/runner/_work/ILGPU/ILGPU/Src/ILGPU.Tests/Generic/TestBase.cs:line 189
   at ILGPU.Tests.TestBase.Execute(Int32 dimension, Object[] arguments) in /home/runner/runner/_work/ILGPU/ILGPU/Src/ILGPU.Tests/Generic/TestBase.cs:line 169
   at ILGPU.Tests.ArrayViews.ArrayViewValid(Int32 length) in /home/runner/runner/_work/ILGPU/ILGPU/Src/ILGPU.Tests/ArrayViews.cs:line 46
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
----- Inner Stack Trace -----
   at System.Threading.Tasks.TaskReplicator.Run[TState](ReplicatableUserAction`1 action, ParallelOptions options, Boolean stopOnFirstFailure)
   at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
   at System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, Action`1 body)
   at ILGPU.Backends.CodeGeneratorBackend`4.Compile(EntryPoint entryPoint, BackendContext& backendContext, KernelSpecialization& specialization) in /_/Src/ILGPU/Backends/CodeGeneratorBackend.cs:line 104
   at ILGPU.Backends.Backend.Compile[TBackendHook](Method kernelMethod, EntryPointDescription& entry, KernelSpecialization& specialization, TBackendHook backendHook) in /_/Src/ILGPU/Backends/Backend.cs:line 706
----- Inner Stack Trace -----
   at ILGPU.Backends.PTX.PTXInstructions.GetArithmeticOperation(BinaryArithmeticKind kind, ArithmeticBasicValueType type, CudaCapabilityContext capabilities, Boolean fastMath) in /_/Src/ILGPU/Backends/PTX/PTXInstructions.cs:line 148
   at ILGPU.Backends.PTX.PTXCodeGenerator.GenerateCode(BinaryArithmeticValue value) in /_/Src/ILGPU/Backends/PTX/PTXCodeGenerator.Values.cs:line 141
   at ILGPU.Backends.BackendCodeGenerator.BackendValueVisitor`1.Visit(BinaryArithmeticValue value) in /_/Src/ILGPU/Backends/IBackendCodeGenerator.cs:line 393
   at ILGPU.IR.Values.BinaryArithmeticValue.Accept[T](T visitor) in /_/Src/ILGPU/IR/Values/Arithmetic.cs:line 325
   at ILGPU.Backends.BackendCodeGenerator.GenerateCodeFor[TCodeGenerator](TCodeGenerator codeGenerator, Value value) in /_/Src/ILGPU/Backends/IBackendCodeGenerator.cs:line 633
   at ILGPU.Backends.PTX.PTXCodeGenerator.GenerateCodeInternal(Int32 registerOffset) in /_/Src/ILGPU/Backends/PTX/PTXCodeGenerator.cs:line 552
   at ILGPU.Backends.PTX.PTXKernelFunctionGenerator.GenerateCode() in /_/Src/ILGPU/Backends/PTX/PTXKernelFunctionGenerator.cs:line 178
   at ILGPU.Backends.CodeGeneratorBackend`4.<>c__DisplayClass1_0.<Compile>b__0(Int32 i) in /_/Src/ILGPU/Backends/CodeGeneratorBackend.cs:line 104
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`1.<ForWorker>b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`1.<ForWorker>b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
   at System.Threading.Tasks.TaskReplicator.Replica.Execute()
  Standard Output Messages:
 Compiling 'ArrayViewValidKernel'

The CUDA tests were working fine under .NET 7.0.306. Here is a successful run from last week.

@m4rs-mt
Copy link
Owner

m4rs-mt commented Aug 15, 2023

Thanks a lot for tracking this separately from the discussion we had in PR #1038. I can confirm that this issue seems to be related to a change in .Net SDK we will address shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants