Skip to content
Snippets Groups Projects

Refactor Configuration API

Merged Frederik Hennig requested to merge fhennig/configuration into v2.0-dev
All threads resolved!

This MR refactors and stabilizes the configuration system of the codegen module. It adopts much code from pystencils-sfg!2 (merged), and once it is through, pystencils-sfg can be updated to inherit its config system from pystencils.

Closes #116 (closed)

codegen.config

  • Introduce Option descriptor for config options with default values, validation, and explicit unsetting
  • Introduce ConfigBase class and Category descriptor for safely modelling config objects and correct implementation of their deep-copying
  • Clean up the option categories and option validation

backend

  • Remove all mention of codegen.config from the backend module, making it exclusive to configuring the codegen driver

Documentation

  • Cleanly separate API reference from user manual pages (finally!)
  • Add docs for updated config system
Edited by Frederik Hennig

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
    • Resolved by Michael Zikeli

      Having the hierarchical structure of all available configs would be beneficial for understanding the codegen configs. E.g.,

      ps.CreateKernalConfig()
      ├── Target
      │   ├── CpuConfig
      │   │   ├── OpenMpOptions
      │   │   ├── VectorizationOptions
      │   ├── GpuConfig
      │   ├── SycleConfig
      ├── jit
      ├── function_name
      ├── ghost_layers
      ├── iteration_slice
      ├── index_field
      ├── index_dtype
      ├── default_dtype
      ├── allow_double_writes
      ├── skip_independence_check
      ├── cpu
      ├── gpu
      ├── sycle

      List is incomplete

  • Michael Zikeli
  • Michael Zikeli
  • Michael Zikeli
  • Michael Zikeli
  • MR looks good. I have some minor suggestions, but in general the MR can be merged.

  • Michael Zikeli approved this merge request

    approved this merge request

  • added 1 commit

    • 9c97cccb - some minor code + docs cleanup

    Compare with previous version

  • Michael Zikeli resolved all threads

    resolved all threads

  • Michael Zikeli mentioned in commit 8c2b59af

    mentioned in commit 8c2b59af

  • Please register or sign in to reply
    Loading