diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 582da6e82..ea29fbc6c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,10 +66,10 @@ jobs: with: fetch-depth: 0 - - name: Setup the latest .NET 7 SDK + - name: Setup the latest .NET 8 SDK uses: actions/setup-dotnet@v3.2.0 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Check Copyright Headers run: | @@ -138,10 +138,10 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Setup the latest .NET 7 SDK + - name: Setup the latest .NET 8 SDK uses: actions/setup-dotnet@v3.2.0 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Build run: dotnet build ${{ matrix.path }} --configuration=Release -p:TreatWarningsAsErrors=true @@ -153,7 +153,7 @@ jobs: matrix: os: ${{ fromJson(needs.setup-os-matrix.outputs.os) }} library: [ILGPU, ILGPU.Algorithms] - framework: [net6.0, net7.0] + framework: [net6.0, net7.0, net8.0] flavor: [CPU, Velocity] exclude: - library: ILGPU.Algorithms @@ -173,10 +173,16 @@ jobs: dotnet-version: 6.0.x - name: Setup the latest .NET 7 SDK + if: matrix.framework == 'net7.0' uses: actions/setup-dotnet@v3.2.0 with: dotnet-version: 7.0.x + - name: Setup the latest .NET 8 SDK + uses: actions/setup-dotnet@v3.2.0 + with: + dotnet-version: 8.0.x + - name: Set test flavor id: test-flavor shell: bash @@ -234,10 +240,10 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Setup the latest .NET 7 SDK + - name: Setup the latest .NET 8 SDK uses: actions/setup-dotnet@v3.2.0 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Create NuGet packages run: | @@ -265,10 +271,10 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Setup the latest .NET 7 SDK + - name: Setup the latest .NET 8 SDK uses: actions/setup-dotnet@v3.2.0 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x # Change the ILGPU project references to NuGet package references - name: Update sample references diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 86ce6a692..71d024304 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -34,16 +34,16 @@ jobs: fail-fast: false matrix: solution: [Src/ILGPU.sln, Samples/ILGPU.Samples.sln] - framework: [net6.0, net7.0] + framework: [net6.0, net7.0, net8.0] steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Setup the latest .NET 7 SDK + - name: Setup the latest .NET 8 SDK uses: actions/setup-dotnet@v3.2.0 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL @@ -66,6 +66,7 @@ jobs: { "net6.0" { $LibrarySamplesTargetFrameworksWindows="net6.0-windows" } "net7.0" { $LibrarySamplesTargetFrameworksWindows="net7.0-windows" } + "net8.0" { $LibrarySamplesTargetFrameworksWindows="net8.0-windows" } } dotnet build -p:UseSharedCompilation=false ` -p:LibraryTargetFrameworks=$LibraryTargetFrameworks ` @@ -73,6 +74,9 @@ jobs: -p:LibrarySamplesTargetFrameworks=$LibrarySamplesTargetFrameworks ` -p:LibrarySamplesTargetFrameworksWindows=$LibrarySamplesTargetFrameworksWindows ` ${{ matrix.solution }} + env: + ILGPU_DOTNET_PREVIEW: ${{ matrix.preview }} + continue-on-error: ${{ matrix.preview }} - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/update-copyright-year.yml b/.github/workflows/update-copyright-year.yml index 8953d63c8..1f07bde39 100644 --- a/.github/workflows/update-copyright-year.yml +++ b/.github/workflows/update-copyright-year.yml @@ -17,10 +17,10 @@ jobs: with: fetch-depth: 0 - - name: Setup the latest .NET 7 SDK + - name: Setup the latest .NET 8 SDK uses: actions/setup-dotnet@v3.2.0 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Update copyright year uses: technote-space/create-pr-action@v2 diff --git a/.github/workflows/update-cuda-versions.yml b/.github/workflows/update-cuda-versions.yml index bc193128f..3bb926fd2 100644 --- a/.github/workflows/update-cuda-versions.yml +++ b/.github/workflows/update-cuda-versions.yml @@ -14,10 +14,10 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Setup the latest .NET 7 SDK + - name: Setup the latest .NET 8 SDK uses: actions/setup-dotnet@v3.2.0 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x - name: Update Cuda versions uses: technote-space/create-pr-action@v2 diff --git a/Samples/BlazorSampleApp/BlazorSampleApp.csproj b/Samples/BlazorSampleApp/BlazorSampleApp.csproj index 48fafc3d8..fb055f273 100644 --- a/Samples/BlazorSampleApp/BlazorSampleApp.csproj +++ b/Samples/BlazorSampleApp/BlazorSampleApp.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 enable enable diff --git a/Samples/Directory.Build.props b/Samples/Directory.Build.props index db5b2aadd..0e813440a 100644 --- a/Samples/Directory.Build.props +++ b/Samples/Directory.Build.props @@ -1,5 +1,9 @@  - + + net8.0 + net8.0-windows + + net7.0 net7.0-windows @@ -7,10 +11,10 @@ net6.0 net6.0-windows + - net6.0;net7.0 - net6.0-windows;net7.0-windows + net6.0;net7.0;net8.0 + net6.0-windows;net7.0-windows;net8.0-windows false - diff --git a/Src/.editorconfig b/Src/.editorconfig index e11d3e957..52ab94fa5 100644 --- a/Src/.editorconfig +++ b/Src/.editorconfig @@ -126,3 +126,24 @@ dotnet_naming_style.begins_with_i.capitalization = pascal_case dotnet_code_quality.ca1711.allowed_suffixes = Flag|Flags|Collection dotnet_code_quality.CAXXXX.api_surface = public, protected + +# ----------------------------------------------------------------------------- +# WORKAROUND: The following functionality requires NET8_0_OR_GREATER +# ----------------------------------------------------------------------------- +# CA1865: Use char overload +dotnet_diagnostic.CA1865.severity = none + +# CA1863: Use 'CompositeFormat' +dotnet_diagnostic.CA1863.severity = none + +# CA1510: Use ArgumentNullException throw helper +dotnet_diagnostic.CA1510.severity = none + +# CA1511:Use ArgumentException throw helper +dotnet_diagnostic.CA1511.severity = none + +# CA1512: Use ArgumentOutOfRangeException throw helper +dotnet_diagnostic.CA1512.severity = none + +# CA1513: Use ObjectDisposedException throw helper +dotnet_diagnostic.CA1513.severity = none \ No newline at end of file diff --git a/Src/Directory.Build.props b/Src/Directory.Build.props index afabb2c8c..3712d40ff 100644 --- a/Src/Directory.Build.props +++ b/Src/Directory.Build.props @@ -1,11 +1,11 @@  - net7.0 + net8.0 $(LibraryTargetFrameworks) - $(LibraryTargetFrameworks);net6.0 + $(LibraryTargetFrameworks);net6.0;net7.0 false @@ -18,11 +18,11 @@ - net7.0 + net8.0 $(LibraryUnitTestTargetFrameworks) - $(LibraryUnitTestTargetFrameworks);net6.0 + $(LibraryUnitTestTargetFrameworks);net6.0;net7.0 false diff --git a/Src/ILGPU.Algorithms.Tests/OptimizationTests.cs b/Src/ILGPU.Algorithms.Tests/OptimizationTests.cs index 7ab8acbbe..2af561b30 100644 --- a/Src/ILGPU.Algorithms.Tests/OptimizationTests.cs +++ b/Src/ILGPU.Algorithms.Tests/OptimizationTests.cs @@ -25,6 +25,7 @@ #pragma warning disable CA1034 #pragma warning disable CA1819 +#pragma warning disable CA1861 // Avoid constant arrays as arguments #pragma warning disable xUnit1026 namespace ILGPU.Algorithms.Tests @@ -196,6 +197,6 @@ public void ParticleSwarmOptimization< } #pragma warning restore xUnit1026 -#pragma warning restore CA1034 +#pragma warning restore CA1861 // Avoid constant arrays as arguments #pragma warning restore CA1819 - +#pragma warning restore CA1034 diff --git a/Src/ILGPU.Algorithms/ILGPU.Algorithms.csproj b/Src/ILGPU.Algorithms/ILGPU.Algorithms.csproj index b89300f85..e50a862c2 100644 --- a/Src/ILGPU.Algorithms/ILGPU.Algorithms.csproj +++ b/Src/ILGPU.Algorithms/ILGPU.Algorithms.csproj @@ -23,6 +23,9 @@ en-US 11.0 + + 12.0 + ../../Bin/$(Configuration)/ diff --git a/Src/ILGPU.Algorithms/Runtime/Cuda/CuBlasException.cs b/Src/ILGPU.Algorithms/Runtime/Cuda/CuBlasException.cs index 8c9ee3d33..c15e9eb4c 100644 --- a/Src/ILGPU.Algorithms/Runtime/Cuda/CuBlasException.cs +++ b/Src/ILGPU.Algorithms/Runtime/Cuda/CuBlasException.cs @@ -56,6 +56,9 @@ public CuBlasException(string message, Exception innerException) } /// +#if NET8_0_OR_GREATER + [Obsolete("SYSLIB0050: Formatter-based serialization is obsolete")] +#endif private CuBlasException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -76,6 +79,9 @@ private CuBlasException(SerializationInfo info, StreamingContext context) #region Methods /// +#if NET8_0_OR_GREATER + [Obsolete("SYSLIB0050: Formatter-based serialization is obsolete")] +#endif public override void GetObjectData( SerializationInfo info, StreamingContext context) diff --git a/Src/ILGPU.Algorithms/Runtime/Cuda/CuFFTException.cs b/Src/ILGPU.Algorithms/Runtime/Cuda/CuFFTException.cs index fa5e946e5..9f51de56b 100644 --- a/Src/ILGPU.Algorithms/Runtime/Cuda/CuFFTException.cs +++ b/Src/ILGPU.Algorithms/Runtime/Cuda/CuFFTException.cs @@ -56,6 +56,9 @@ public CuFFTException(string message, Exception innerException) } /// +#if NET8_0_OR_GREATER + [Obsolete("SYSLIB0050: Formatter-based serialization is obsolete")] +#endif private CuFFTException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -76,6 +79,9 @@ private CuFFTException(SerializationInfo info, StreamingContext context) #region Methods /// +#if NET8_0_OR_GREATER + [Obsolete("SYSLIB0050: Formatter-based serialization is obsolete")] +#endif public override void GetObjectData( SerializationInfo info, StreamingContext context) diff --git a/Src/ILGPU.Algorithms/Runtime/Cuda/CuRandException.cs b/Src/ILGPU.Algorithms/Runtime/Cuda/CuRandException.cs index d5b692af6..9f47df9f3 100644 --- a/Src/ILGPU.Algorithms/Runtime/Cuda/CuRandException.cs +++ b/Src/ILGPU.Algorithms/Runtime/Cuda/CuRandException.cs @@ -56,6 +56,9 @@ public CuRandException(string message, Exception innerException) } /// +#if NET8_0_OR_GREATER + [Obsolete("SYSLIB0050: Formatter-based serialization is obsolete")] +#endif private CuRandException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -76,6 +79,9 @@ private CuRandException(SerializationInfo info, StreamingContext context) #region Methods /// +#if NET8_0_OR_GREATER + [Obsolete("SYSLIB0050: Formatter-based serialization is obsolete")] +#endif public override void GetObjectData( SerializationInfo info, StreamingContext context) diff --git a/Src/ILGPU.Algorithms/Runtime/Cuda/NvJpegException.cs b/Src/ILGPU.Algorithms/Runtime/Cuda/NvJpegException.cs index 000af2816..ca97f7042 100644 --- a/Src/ILGPU.Algorithms/Runtime/Cuda/NvJpegException.cs +++ b/Src/ILGPU.Algorithms/Runtime/Cuda/NvJpegException.cs @@ -56,6 +56,9 @@ public NvJpegException(string message, Exception innerException) } /// +#if NET8_0_OR_GREATER + [Obsolete("SYSLIB0050: Formatter-based serialization is obsolete")] +#endif private NvJpegException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -76,6 +79,9 @@ private NvJpegException(SerializationInfo info, StreamingContext context) #region Methods /// +#if NET8_0_OR_GREATER + [Obsolete("SYSLIB0050: Formatter-based serialization is obsolete")] +#endif public override void GetObjectData( SerializationInfo info, StreamingContext context) diff --git a/Src/ILGPU.Algorithms/Runtime/Cuda/NvmlException.cs b/Src/ILGPU.Algorithms/Runtime/Cuda/NvmlException.cs index 89ecdb2e2..8c902a65d 100644 --- a/Src/ILGPU.Algorithms/Runtime/Cuda/NvmlException.cs +++ b/Src/ILGPU.Algorithms/Runtime/Cuda/NvmlException.cs @@ -56,6 +56,9 @@ public NvmlException(string message, Exception innerException) } /// +#if NET8_0_OR_GREATER + [Obsolete("SYSLIB0050: Formatter-based serialization is obsolete")] +#endif private NvmlException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -76,6 +79,9 @@ private NvmlException(SerializationInfo info, StreamingContext context) #region Methods /// +#if NET8_0_OR_GREATER + [Obsolete("SYSLIB0050: Formatter-based serialization is obsolete")] +#endif public override void GetObjectData( SerializationInfo info, StreamingContext context) diff --git a/Src/ILGPU.Algorithms/Vectors/VectorTypes.tt b/Src/ILGPU.Algorithms/Vectors/VectorTypes.tt index 27c9bc685..b7d20f264 100644 --- a/Src/ILGPU.Algorithms/Vectors/VectorTypes.tt +++ b/Src/ILGPU.Algorithms/Vectors/VectorTypes.tt @@ -451,7 +451,11 @@ namespace ILGPU.Algorithms.Vectors /// /// The readonly span instance. public unsafe ReadOnlySpan<<#= type.Type #>> AsSpan() => +#if NET8_0_OR_GREATER + new(Unsafe.AsPointer(ref Unsafe.AsRef(in this)), <#= vectorLength #>); +#else new(Unsafe.AsPointer(ref Unsafe.AsRef(this)), <#= vectorLength #>); +#endif /// /// Iterates over all elements by applying the given iterator to each element. diff --git a/Src/ILGPU.Tests/Generic/TestBase.cs b/Src/ILGPU.Tests/Generic/TestBase.cs index c8a79312d..cc2873769 100644 --- a/Src/ILGPU.Tests/Generic/TestBase.cs +++ b/Src/ILGPU.Tests/Generic/TestBase.cs @@ -44,7 +44,7 @@ public static bool CleanTests var env = Environment.GetEnvironmentVariable( CleanTestsEnvironmentVariable); return !string.IsNullOrWhiteSpace(env) - && env.ToUpperInvariant() != "FALSE" + && !env.Equals("FALSE", StringComparison.OrdinalIgnoreCase) && env != "0"; } } diff --git a/Src/ILGPU/AssemblyAttributes.cs b/Src/ILGPU/AssemblyAttributes.cs index bce24fa1f..a73e5b1c1 100644 --- a/Src/ILGPU/AssemblyAttributes.cs +++ b/Src/ILGPU/AssemblyAttributes.cs @@ -1,4 +1,8 @@ using ILGPU; using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo(Context.RuntimeAssemblyName)] +// WORKAROUND: There is an issue with net8.0 that causes the compiler to crash. +// https://github.com/dotnet/roslyn/issues/71039 + +[assembly: InternalsVisibleTo("ILGPURuntime")] +// [assembly: InternalsVisibleTo(Context.RuntimeAssemblyName)] diff --git a/Src/ILGPU/Backends/InvalidCodeGenerationException.cs b/Src/ILGPU/Backends/InvalidCodeGenerationException.cs index f807c5a89..ee024c5b3 100644 --- a/Src/ILGPU/Backends/InvalidCodeGenerationException.cs +++ b/Src/ILGPU/Backends/InvalidCodeGenerationException.cs @@ -1,6 +1,6 @@ // --------------------------------------------------------------------------------------- // ILGPU -// Copyright (c) 2018-2021 ILGPU Project +// Copyright (c) 2018-2023 ILGPU Project // www.ilgpu.net // // File: InvalidCodeGenerationException.cs @@ -51,6 +51,9 @@ public InvalidCodeGenerationException(string message, Exception innerException) /// /// Constructs a new code generation exception. /// +#if NET8_0_OR_GREATER + [Obsolete("SYSLIB0050: Formatter-based serialization is obsolete")] +#endif private InvalidCodeGenerationException( SerializationInfo info, StreamingContext context) diff --git a/Src/ILGPU/Backends/NotSupportedIntrinsicException.cs b/Src/ILGPU/Backends/NotSupportedIntrinsicException.cs index 9fcadbefb..212543082 100644 --- a/Src/ILGPU/Backends/NotSupportedIntrinsicException.cs +++ b/Src/ILGPU/Backends/NotSupportedIntrinsicException.cs @@ -1,6 +1,6 @@ // --------------------------------------------------------------------------------------- // ILGPU -// Copyright (c) 2019-2021 ILGPU Project +// Copyright (c) 2019-2023 ILGPU Project // www.ilgpu.net // // File: NotSupportedIntrinsicException.cs @@ -65,6 +65,9 @@ public NotSupportedIntrinsicException(string message, Exception innerException) /// /// Constructs a new intrinsic exception. /// +#if NET8_0_OR_GREATER + [Obsolete("SYSLIB0050: Formatter-based serialization is obsolete")] +#endif private NotSupportedIntrinsicException( SerializationInfo info, StreamingContext context) diff --git a/Src/ILGPU/Backends/PTX/Analyses/OptimizedPTXBlockSchedule.cs b/Src/ILGPU/Backends/PTX/Analyses/OptimizedPTXBlockSchedule.cs index 946f76336..dada3c497 100644 --- a/Src/ILGPU/Backends/PTX/Analyses/OptimizedPTXBlockSchedule.cs +++ b/Src/ILGPU/Backends/PTX/Analyses/OptimizedPTXBlockSchedule.cs @@ -171,7 +171,8 @@ public static PTXBlockSchedule CreateOptimizedPTXSchedule( /// The control-flow direction. /// The input blocks. /// The created block schedule. - private static PTXBlockSchedule CreateSchedule( + private static OptimizedPTXBlockSchedule + CreateSchedule( in BasicBlockCollection blocks) where TOrder : struct, ITraversalOrder where TDirection : struct, IControlFlowDirection => diff --git a/Src/ILGPU/CapabilityNotSupportedException.cs b/Src/ILGPU/CapabilityNotSupportedException.cs index f47606316..c177380bb 100644 --- a/Src/ILGPU/CapabilityNotSupportedException.cs +++ b/Src/ILGPU/CapabilityNotSupportedException.cs @@ -1,6 +1,6 @@ // --------------------------------------------------------------------------------------- // ILGPU -// Copyright (c) 2020-2021 ILGPU Project +// Copyright (c) 2020-2023 ILGPU Project // www.ilgpu.net // // File: CapabilityNotSupportedException.cs @@ -63,6 +63,9 @@ public CapabilityNotSupportedException(string message, Exception innerException) /// The System.Runtime.Serialization.StreamingContext that contains contextual /// information about the source or destination. /// +#if NET8_0_OR_GREATER + [Obsolete("SYSLIB0050: Formatter-based serialization is obsolete")] +#endif private CapabilityNotSupportedException( SerializationInfo serializationInfo, StreamingContext streamingContext) diff --git a/Src/ILGPU/Context.cs b/Src/ILGPU/Context.cs index b2cb96ecb..b9e433d35 100644 --- a/Src/ILGPU/Context.cs +++ b/Src/ILGPU/Context.cs @@ -435,7 +435,7 @@ public IEnumerable GetPreferredDevices( .Where(d => d.AcceleratorType != AcceleratorType.CPU) .ToList(); - if (sorted.Any()) + if (sorted.Count > 0) { if (matchingDevicesOnly) { diff --git a/Src/ILGPU/Frontend/Intrinsic/ArrayIntrinsics.cs b/Src/ILGPU/Frontend/Intrinsic/ArrayIntrinsics.cs index e5088e4c0..f42751269 100644 --- a/Src/ILGPU/Frontend/Intrinsic/ArrayIntrinsics.cs +++ b/Src/ILGPU/Frontend/Intrinsic/ArrayIntrinsics.cs @@ -100,7 +100,7 @@ private static ValueReference CreateNewArray(ref InvocationContext context) /// /// The current invocation context. /// The resulting value. - private static Value CreateEmptyArray(ref InvocationContext context) + private static NewArray CreateEmptyArray(ref InvocationContext context) { var location = context.Location; var builder = context.Builder; @@ -154,7 +154,8 @@ private static Value CreateSetArrayElement(ref InvocationContext context) /// /// The current invocation context. /// The resulting value. - private static Value CreateGetArrayLowerBound(ref InvocationContext context) => + private static PrimitiveValue CreateGetArrayLowerBound( + ref InvocationContext context) => context.Builder.CreatePrimitiveValue( context.Location, 0); diff --git a/Src/ILGPU/ILGPU.csproj b/Src/ILGPU/ILGPU.csproj index 3848366e9..4228847f2 100644 --- a/Src/ILGPU/ILGPU.csproj +++ b/Src/ILGPU/ILGPU.csproj @@ -23,6 +23,9 @@ en-US 11.0 + + 12.0 + ../../Bin/$(Configuration)/ diff --git a/Src/ILGPU/InternalCompilerException.cs b/Src/ILGPU/InternalCompilerException.cs index 17572bfd4..0f87f69c7 100644 --- a/Src/ILGPU/InternalCompilerException.cs +++ b/Src/ILGPU/InternalCompilerException.cs @@ -1,6 +1,6 @@ // --------------------------------------------------------------------------------------- // ILGPU -// Copyright (c) 2020-2021 ILGPU Project +// Copyright (c) 2020-2023 ILGPU Project // www.ilgpu.net // // File: InternalCompilerException.cs @@ -63,6 +63,9 @@ public InternalCompilerException(string message, Exception innerException) /// The System.Runtime.Serialization.StreamingContext that contains contextual /// information about the source or destination. /// +#if NET8_0_OR_GREATER + [Obsolete("SYSLIB0050: Formatter-based serialization is obsolete")] +#endif private InternalCompilerException( SerializationInfo serializationInfo, StreamingContext streamingContext) diff --git a/Src/ILGPU/InvalidKernelOperationException.cs b/Src/ILGPU/InvalidKernelOperationException.cs index 5f6e098d7..1f2d5eb5d 100644 --- a/Src/ILGPU/InvalidKernelOperationException.cs +++ b/Src/ILGPU/InvalidKernelOperationException.cs @@ -1,6 +1,6 @@ // --------------------------------------------------------------------------------------- // ILGPU -// Copyright (c) 2018-2021 ILGPU Project +// Copyright (c) 2018-2023 ILGPU Project // www.ilgpu.net // // File: InvalidKernelOperationException.cs @@ -39,6 +39,9 @@ public InvalidKernelOperationException(string message, Exception innerException) : base(message, innerException) { } +#if NET8_0_OR_GREATER + [Obsolete("SYSLIB0050: Formatter-based serialization is obsolete")] +#endif private InvalidKernelOperationException( SerializationInfo serializationInfo, StreamingContext streamingContext) diff --git a/Src/ILGPU/Runtime/AcceleratorException.cs b/Src/ILGPU/Runtime/AcceleratorException.cs index 96d4cd858..dafa56597 100644 --- a/Src/ILGPU/Runtime/AcceleratorException.cs +++ b/Src/ILGPU/Runtime/AcceleratorException.cs @@ -1,6 +1,6 @@ // --------------------------------------------------------------------------------------- // ILGPU -// Copyright (c) 2021 ILGPU Project +// Copyright (c) 2021-2023 ILGPU Project // www.ilgpu.net // // File: AcceleratorException.cs @@ -63,6 +63,9 @@ protected AcceleratorException(string message, Exception innerException) /// The System.Runtime.Serialization.StreamingContext that contains contextual /// information about the source or destination. /// +#if NET8_0_OR_GREATER + [Obsolete("SYSLIB0050: Formatter-based serialization is obsolete")] +#endif protected AcceleratorException( SerializationInfo serializationInfo, StreamingContext streamingContext) diff --git a/Src/ILGPU/Runtime/CPU/CPUAccelerator.cs b/Src/ILGPU/Runtime/CPU/CPUAccelerator.cs index 3e2360f23..d39252caa 100644 --- a/Src/ILGPU/Runtime/CPU/CPUAccelerator.cs +++ b/Src/ILGPU/Runtime/CPU/CPUAccelerator.cs @@ -178,7 +178,7 @@ protected override MemoryBuffer AllocateRawInternal( /// The kernel to load. /// The custom group size. /// The loaded kernel - private Kernel LoadKernel(CompiledKernel kernel, int customGroupSize) + private CPUKernel LoadKernel(CompiledKernel kernel, int customGroupSize) { if (kernel == null) throw new ArgumentNullException(nameof(kernel)); diff --git a/Src/ILGPU/Runtime/Cuda/CudaException.cs b/Src/ILGPU/Runtime/Cuda/CudaException.cs index 458b706aa..d0cbc9bdd 100644 --- a/Src/ILGPU/Runtime/Cuda/CudaException.cs +++ b/Src/ILGPU/Runtime/Cuda/CudaException.cs @@ -64,6 +64,9 @@ public CudaException(string message, Exception innerException) { } /// +#if NET8_0_OR_GREATER + [Obsolete("SYSLIB0050: Formatter-based serialization is obsolete")] +#endif private CudaException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -90,6 +93,9 @@ private CudaException(SerializationInfo info, StreamingContext context) /// +#if NET8_0_OR_GREATER + [Obsolete("SYSLIB0050: Formatter-based serialization is obsolete")] +#endif public override void GetObjectData( SerializationInfo info, StreamingContext context) diff --git a/Src/ILGPU/Runtime/OpenCL/CLException.cs b/Src/ILGPU/Runtime/OpenCL/CLException.cs index 534dc8b11..7277ea319 100644 --- a/Src/ILGPU/Runtime/OpenCL/CLException.cs +++ b/Src/ILGPU/Runtime/OpenCL/CLException.cs @@ -64,6 +64,9 @@ public CLException(string message, Exception innerException) { } /// +#if NET8_0_OR_GREATER + [Obsolete("SYSLIB0050: Formatter-based serialization is obsolete")] +#endif private CLException(SerializationInfo info, StreamingContext context) : base(info, context) { @@ -89,6 +92,9 @@ private CLException(SerializationInfo info, StreamingContext context) #region Methods /// +#if NET8_0_OR_GREATER + [Obsolete("SYSLIB0050: Formatter-based serialization is obsolete")] +#endif public override void GetObjectData( SerializationInfo info, StreamingContext context) diff --git a/Src/ILGPU/Runtime/Velocity/VelocityAccelerator.cs b/Src/ILGPU/Runtime/Velocity/VelocityAccelerator.cs index a9b25410d..7ba2dbb26 100644 --- a/Src/ILGPU/Runtime/Velocity/VelocityAccelerator.cs +++ b/Src/ILGPU/Runtime/Velocity/VelocityAccelerator.cs @@ -397,7 +397,7 @@ protected override MemoryBuffer AllocateRawInternal( /// The kernel to load. /// The custom group size. /// The loaded kernel - private Kernel LoadKernel(CompiledKernel kernel, int customGroupSize) + private VelocityKernel LoadKernel(CompiledKernel kernel, int customGroupSize) { if (kernel is null) throw new ArgumentNullException(nameof(kernel)); diff --git a/Tools/CopyrightUpdateTool/CopyrightUpdateTool.csproj b/Tools/CopyrightUpdateTool/CopyrightUpdateTool.csproj index 35ade06eb..3784fe1cd 100644 --- a/Tools/CopyrightUpdateTool/CopyrightUpdateTool.csproj +++ b/Tools/CopyrightUpdateTool/CopyrightUpdateTool.csproj @@ -2,13 +2,13 @@ Exe - net7.0 + net8.0 enable - - + + diff --git a/Tools/CudaVersionUpdateTool/CudaVersionUpdateTool.csproj b/Tools/CudaVersionUpdateTool/CudaVersionUpdateTool.csproj index 9fac1d872..5dca6aec7 100644 --- a/Tools/CudaVersionUpdateTool/CudaVersionUpdateTool.csproj +++ b/Tools/CudaVersionUpdateTool/CudaVersionUpdateTool.csproj @@ -2,15 +2,15 @@ Exe - net7.0 + net8.0 enable enable - - - + + + diff --git a/global.json b/global.json index b79dd8fc7..da113e4cb 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "7.0.0", + "version": "8.0.0", "rollForward": "latestFeature", "allowPrerelease": false }