Skip to content

Commit

Permalink
Adapted MemoryBufferOperation tests to support different group config…
Browse files Browse the repository at this point in the history
…urations.
  • Loading branch information
m4rs-mt committed Sep 3, 2023
1 parent 5d8ab6a commit bec7e96
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Src/ILGPU.Tests/MemoryBufferOperations.tt
Original file line number Diff line number Diff line change
Expand Up @@ -264,13 +264,15 @@ namespace ILGPU.Tests
}

<# foreach (var type in copyTypes) { #>
[Theory]
[SkippableTheory]
<# foreach (var length in lengths) { #>
[InlineData(<#= length #>)]
<# } #>
[KernelMethod(nameof(Copy2D_Kernel))]
public void Copy2D_<#= type.Name #>(int length)
{
Skip.If(length > Accelerator.MaxGroupSize.Y);

var extent = new LongIndex2D(length, length);
Func<int, <#= type.Type #>> converter = c => (<#= type.Type #>)c;
var expected = InitializeArray2D(length, converter);
Expand Down Expand Up @@ -334,13 +336,17 @@ namespace ILGPU.Tests
}

<# foreach (var type in copyTypes) { #>
[Theory]
[SkippableTheory]
<# foreach (var length in lengths) { #>
[InlineData(<#= length #>)]
<# } #>
[KernelMethod(nameof(Copy3D_Kernel))]
public void Copy3D_<#= type.Name #>(int length)
{
Skip.If(
length > Accelerator.MaxGroupSize.Y ||
length > Accelerator.MaxGroupSize.Z);

var extent = new LongIndex3D(length, length, length);
Func<int, <#= type.Type #>> converter = c => (<#= type.Type #>)c;
var expected = InitializeArray3D(length, converter);
Expand Down

0 comments on commit bec7e96

Please sign in to comment.