-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for net80 SDK. (#1132)
* Added workaround for net80 compiler. * Mark formatter-based serialization as obsolete. * Fixed compilation `ref readonly parameters` not available in C# 11.0. * CA1859: Use concrete types when possible for improved performance * CA1860: Avoid using 'Enumerable.Any()' extension method * CA1861: Avoid constant arrays as arguments * CA1862: Use the 'StringComparison' method overloads to perform case-insensitive string comparisons * Suppress warnings for functionality that is only available from net8.0 onwards. * Added support for net80 SDK.
- Loading branch information
Showing
35 changed files
with
161 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected] | ||
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/[email protected] | ||
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/[email protected] | ||
with: | ||
dotnet-version: 7.0.x | ||
|
||
- name: Setup the latest .NET 8 SDK | ||
uses: actions/[email protected] | ||
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/[email protected] | ||
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/[email protected] | ||
with: | ||
dotnet-version: 7.0.x | ||
dotnet-version: 8.0.x | ||
|
||
# Change the ILGPU project references to NuGet package references | ||
- name: Update sample references | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected] | ||
with: | ||
dotnet-version: 7.0.x | ||
dotnet-version: 8.0.x | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
|
@@ -66,13 +66,17 @@ 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 ` | ||
-p:LibraryUnitTestTargetFrameworks=$LibraryUnitTestTargetFrameworks ` | ||
-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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected] | ||
with: | ||
dotnet-version: 7.0.x | ||
dotnet-version: 8.0.x | ||
|
||
- name: Update copyright year | ||
uses: technote-space/create-pr-action@v2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected] | ||
with: | ||
dotnet-version: 7.0.x | ||
dotnet-version: 8.0.x | ||
|
||
- name: Update Cuda versions | ||
uses: technote-space/create-pr-action@v2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
<Project> | ||
<PropertyGroup Condition="'$(MSBuildVersion)' >= '17.4'"> | ||
<PropertyGroup Condition="'$(MSBuildVersion)' >= '17.8'"> | ||
<LibrarySamplesTargetFrameworks>net8.0</LibrarySamplesTargetFrameworks> | ||
<LibrarySamplesTargetFrameworksWindows>net8.0-windows</LibrarySamplesTargetFrameworksWindows> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(MSBuildVersion)' >= '17.4' AND '$(MSBuildVersion)' < '17.8' "> | ||
<LibrarySamplesTargetFrameworks>net7.0</LibrarySamplesTargetFrameworks> | ||
<LibrarySamplesTargetFrameworksWindows>net7.0-windows</LibrarySamplesTargetFrameworksWindows> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(MSBuildVersion)' < '17.4'"> | ||
<LibrarySamplesTargetFrameworks>net6.0</LibrarySamplesTargetFrameworks> | ||
<LibrarySamplesTargetFrameworksWindows>net6.0-windows</LibrarySamplesTargetFrameworksWindows> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'"> | ||
<LibrarySamplesTargetFrameworks>net6.0;net7.0</LibrarySamplesTargetFrameworks> | ||
<LibrarySamplesTargetFrameworksWindows>net6.0-windows;net7.0-windows</LibrarySamplesTargetFrameworksWindows> | ||
<LibrarySamplesTargetFrameworks>net6.0;net7.0;net8.0</LibrarySamplesTargetFrameworks> | ||
<LibrarySamplesTargetFrameworksWindows>net6.0-windows;net7.0-windows;net8.0-windows</LibrarySamplesTargetFrameworksWindows> | ||
<CheckEolTargetFramework>false</CheckEolTargetFramework> | ||
</PropertyGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)] |
Oops, something went wrong.