Share the GPU smoke test between OptimalControl and OptimalControlScalarized

Ouverte
#445 0 commentaires 0 réactions 1 personne assignée Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@ocots y travaille déjà.

Depuis le 10/11/2026.

Évaluation

Cette issue n'a pas encore été évaluée.

Description

Context

Follow-up of #441, to be done once its phase C (shared OptimalControl / OptimalControlScalarized runners in test/common/optimalcontrol_tests.jl) is merged.

The two GPU smoke files differ only by the backend and the configuration group:

  • test/suite/GPU/test_smoke_optimalcontrol.jl (GPU_CONFIGS.OptimalControl, entry function test_smoke_optimalcontrol)
  • test/suite/GPU/test_smoke_scalarized.jl (GPU_CONFIGS.OptimalControlScalarized, entry function test_smoke_scalarized)

Everything else is identical: the CUDA_FUNCTIONAL branch with the visible skip (TST6), the solve with SMOKE_GRID and SMOKE_MAX_ITER, and the finite-objective check.

Goal

Factor the GPU smoke test into one shared implementation parameterized by the backend, as #441 does for test_problem, test_smoke and test_convergence, without changing the behavior on a CPU runner or on a GPU runner.

Proposed approach

  • In test/common/optimalcontrol_tests.jl, or in a new test/common/gpu_tests.jl if the module must not load Main.TestCapabilities in CPU environments, add test_smoke_gpu(backend). The configurations come from getfield(Main.TestConfigs.GPU_CONFIGS, Main.TestStatus.modeling(backend)).
  • Keep the two test files, each as a thin wrapper with its own module and entry function (TST1), so that the report names (test_smoke_optimalcontrol <label>, test_smoke_scalarized <label>) do not change.
  • Keep TST6: no early return in a @testset, Test.@test_skip without a functional device, and test_contract.jl still fails loudly on a kkt or occidata runner without a device.
  • Check that tools/ci/scope.py (Repository.includers) still finds the includers of the new shared file; GPU is an opt-in environment, so it never enters the automatic scope. Add a case to tools/ci/test/test_scope.py if a new file is created.
  • Update test/README.md ("GPU tests") if the layout changes.

Out of scope

  • The GPU configurations and the solvers (GPU_CONFIGS in test/common/configs.jl).
  • Running the GPU tests in CI: they need the run ci kkt-runner or run ci occidata-runner label, and a runner with a device.

Checks

  • On a CPU machine: Pkg.test(; test_args=["GPU"]) reports the same tests as Broken (skipped) as before.
  • On a GPU runner: the same solves run and the same lines appear in the report.
Langage dominant
Julia
Étoiles
13
Forks
1
Merge moyen
3 h 36 min
PR mergées (30 j)
57

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de control-toolbox/OptimalControlProblems.jl

Toutes les issues de control-toolbox/OptimalControlProblems.jl

Issues similaires

Plus d'issues Julia

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.