Skip to content

Commit

Permalink
Adjusted CPU-based SGO optimizer tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
m4rs-mt committed Feb 23, 2024
1 parent fa63875 commit 02ec9f7
Showing 1 changed file with 9 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// ---------------------------------------------------------------------------------------
// ILGPU Algorithms
// Copyright (c) 2023 ILGPU Project
// Copyright (c) 2023-2024 ILGPU Project
// www.ilgpu.net
//
// File: CPUMetaOptimizerTests.cs
// File: CPUSGOOptimizerTests.cs
//
// This file is part of ILGPU and is distributed under the University of Illinois Open
// Source License. See LICENSE.txt for details.
Expand All @@ -24,9 +24,9 @@ namespace ILGPU.Algorithms.Tests.CPU
{
/// <summary>
/// Contains tests to verify the functionality of the CPU-specialized
/// <see cref="MetaOptimizer{T,TEvalType}"/> class.
/// <see cref="SGOOptimizer{T,TEvalType}"/> class.
/// </summary>
public class CPUMetaOptimizerTests
public class CPUSGOOptimizerTests
{
#region CPU Functions

Expand Down Expand Up @@ -155,18 +155,8 @@ public bool CurrentIsBetter(float current, float proposed) =>

#region MemberData

public static TheoryData<
object,
object,
object,
object,
object> TestData =>
new TheoryData<
object,
object,
object,
object,
object>
public static TheoryData<object, int, float, float, float> TestData =>
new TheoryData<object, int, float, float, float>
{
{ new HimmelblauFunction(), 8192, 0.5f, 0.5f, 0.5f },
{ new EasomFunction(), 81920, 0.5f, 0.5f, 0.5f },
Expand All @@ -190,7 +180,7 @@ public void MetaOptimizationScalar<TObjective>(
int numDimensions = objective.LowerBounds.Length;
var random = new System.Random(13377331);

using var optimizer = MetaOptimizer.CreateScalar<
using var optimizer = SGOOptimizer.CreateScalar<
float,
float,
RandomRanges.RandomRangeFloatProvider<XorShift64Star>>(
Expand Down Expand Up @@ -232,7 +222,7 @@ public void MetaOptimizationVectorized<TObjective>(
int numDimensions = objective.LowerBounds.Length;
var random = new System.Random(13377331);

using var optimizer = MetaOptimizer.CreateVectorized<
using var optimizer = SGOOptimizer.CreateVectorized<
float,
float,
RandomRanges.RandomRangeFloatProvider<XorShift64Star>>(
Expand Down Expand Up @@ -276,7 +266,7 @@ public void MetaOptimizationScalarRaw<TObjective>(
int numDimensions = objective.LowerBounds.Length;
var random = new System.Random(13377331);

using var optimizer = MetaOptimizer.CreateScalar<
using var optimizer = SGOOptimizer.CreateScalar<
float,
float,
RandomRanges.RandomRangeFloatProvider<XorShift64Star>>(
Expand Down

0 comments on commit 02ec9f7

Please sign in to comment.