---
# The MLONMCU_HOME is filled in automatically when creating the environment
home: "{{ home_dir }}"
logging:
  level: DEBUG
  to_file: false
  rotate: false
cleanup:
  auto: true
  keep: 10
# Default locations for certain directoriescan be changed here
# Non-absolute paths will always be threated relative to the MLONMCU_HOME
paths:
  # Where the dependencies are downloaded and installed
  deps: deps
  # If logging to file is used keep logs in this directory
  logs: logs
  # Location where reports and artifacts are written to
  results: results
  # Directory where custom extensions can be integrated
  plugins: plugins
  # Directory for intermediate build products, should be located on a large enough drive
  temp: temp
  # A collection of models which will be used to look for models
  # The paths will be checked in the order defined here stopping at the first match
  # Non-existant paths will be skipped without throwing an error
  models:
    - "{{ home_dir }}/models"
    - "{{ config_dir }}/models"
# Here default clone_urls
repos:
  tensorflow:  # TODO: rename to tflite-micro?
    url: "https://github.com/tensorflow/tflite-micro.git"
    ref: ca5358f4680dbd94717a4c6bd77186bc1c799e1b
    options:
      single_branch: true
  # tflite_micro_compiler:
  #   url: "https://github.com/PhilippvK/tflite_micro_compiler.git"
  #   ref: patches
  tvm:
    url: "https://github.com/PhilippvK/tvm.git"  # TODO: change to upstream after pr merged
    ref: develop
    options:
      recursive: true
      submodules:
        - 3rdparty/dlpack
        - 3rdparty/dmlc-core
        - 3rdparty/libbacktrace
        - 3rdparty/rang
  # utvm_staticrt_codegen:
  #   url: "https://github.com/tum-ei-eda/utvm_staticrt_codegen.git"
  #   ref: master
  # tvm_extensions:
  #   url: "https://github.com/tum-ei-eda/tvm_extensions.git"
  #   ref: main
  etiss:  # TODO: wait for merge
    url: "https://github.com/PhilippvK/etiss.git"
    ref: staging-new  # TODO: change after fixing semihosting issue
  muriscvnn:
    url: "https://github.com/tum-ei-eda/muriscv-nn.git"
    ref: bc60b2d2f541e1fee6352b9c9ab7cb442ff59bf4
  spike:
    url: "https://github.com/riscv-software-src/riscv-isa-sim.git"
    ref: 0bc176b3fca43560b9e8586cdbc41cfde073e17a
  spikepk:
    url: "https://github.com/riscv-software-src/riscv-pk.git"
    ref: 573c858d9071a2216537f71de651a814f76ee76d
  cmsis:
    url: "https://github.com/ARM-software/CMSIS_5.git"
    ref: 51263182d16c92649a48144ba56c0945f9fce60e
    options:
      single_branch: true
      # Shallow clone could save 200MB clone size, but not really possible with commit
      # shallow: true
  cmsisnn:
    url: "https://github.com/ARM-software/CMSIS-NN.git"
    # ref: v4.0.0
    ref: ffeca904368926d60caeb2d97858215626892f35
  ethosu_platform:
    url: "https://review.mlplatform.org/ml/ethos-u/ethos-u-core-platform"
    ref: fc42c71353d15c564558249bd4f13350119ab6a9
  mlif:
    url: "https://github.com/tum-ei-eda/mlonmcu-sw.git"
    ref: 56bfd3774c10189376d4e5ee16b78ddec71bca98
  # espidf:
  #   url: "https://github.com/espressif/esp-idf.git"
  #   ref: release/v4.4
  #   options:
  #     recursive: true
  # zephyr:
  #   url: "https://github.com/zephyrproject-rtos/zephyr.git"
  #   ref: v3.2.0
  microtvm_etiss:
    url: "https://github.com/PhilippvK/microtvm-etiss-template.git"
    ref: b1e53bdae24bb35e53d7cdad2917a9090f7fa933
  microtvm_spike:
    url: "https://github.com/PhilippvK/microtvm-spike-template.git"
    ref: ddaaf4554aaafb0a509cd4d9db3397e07b512d9d
  tflite_pack:
    url: "https://github.com/tum-ei-eda/tflite-pack.git"
    ref: 439b78d36456f716629ad9dbaff9734baaa75db9
  vicuna:
    url: "https://github.com/vproc/vicuna.git"
    ref: c1484ec8fa9f1106505a4ca246af39a66420a1d0
  verilator:
    url: "https://github.com/verilator/verilator"
    ref: tags/v4.210
  dtc:
    url: "https://github.com/dgibson/dtc.git"
    ref: main
  embench:
    url: "https://github.com/embench/embench-iot.git"
    ref: master
  taclebench:
    url: "https://github.com/tacle/tacle-bench.git"
    ref: master
  polybench:
    url: "https://github.com/MatthiasJReisinger/PolyBenchC-4.2.1.git"
    ref: master
  mibench:
    url: "https://github.com/embecosm/mibench.git"
    ref: master

# Here all supported frameworks with their specific features are defined
# Optionally disable unwanted or incomatible backends or features here
# The configured defaults are used if no backend was specified in the command line options
frameworks:
  default: tvm
  tflm:
    enabled: true
    backends:
      default: tflmi
      # tflmc:
      #   enabled: true
      tflmi:
        enabled: true
        features:
          debug_arena: true
    features:
      muriscvnn: true
      cmsisnn: true
  tvm:
    enabled: true
    backends:
      default: tvmaotplus
      tvmrt:
        enabled: true
        features:
          debug_arena: true
          disable_legalize: false
          autotuned: true
      tvmllvm:
        enabled: true
        features:
          debug_arena: true
          disable_legalize: false
          autotuned: true
      tvmaot:
        enabled: true
        features:
          debug_arena: true
          unpacked_api: true
          usmp: true
          disable_legalize: false
          autotuned: true
      tvmaotplus:
        enabled: true
        features:
          debug_arena: true
          disable_legalize: false
          autotuned: true
      # tvmcg:
      #   enabled: true
      #   features:
      #     debug_arena: true
      #     disable_legalize: false
      #     autotune: true
      #     autotuned: true
    features: []
    # features:
    #   muriscvnnbyoc: true
    #   cmsisnnbyoc: true
# Some frontends are eperimental and therefore disabled here
# Features like packing are only available in certain environments
#
frontends:
  tflite:
    enabled: true
    features:
      validate: true
      visualize: true
      split_layers: true
  relay:
    enabled: true
    features:
      relayviz: true
  # packed:
  #   enabled: false
  #   features:
  #     packing: true
  #     packed: true
  # onnx:
  #   enabled: true
  # TODO: saved_model (TF->TFLITE), ipynb (IPYNB->?)
  pb:
    enabled: true
  paddle:
    enabled: true
  example:
    enabled: true
  embench:
    enabled: true
  taclebench:
    enabled: true
  polybench:
    enabled: true
  coremark:
    enabled: true
  mathis:
    enabled: true
  dhrystone:
    enabled: true
  mibench:
    enabled: true
# List of supported targets in the environment
targets:
  default: etiss
  etiss:
    enabled: true
    features:
      gdbserver: true
      etissdbg: true
      trace: true
      log_instrs: true
  # etiss_pulpino:
  #   enabled: true
  #   features:
  #     gdbserver: true
  #     etissdbg: true
  #     trace: true
  #     log_instrs: true
  host_x86:
    enabled: true
    features:
      gdbserver: true
  spike:
    enabled: true
    features:
      vext: true
      pext: true
      bext: true
      cachesim: true
      log_instrs: true
  ovpsim:
    enabled: true
    features:
      vext: true
      pext: true
  corstone300:
    enabled: false
    features:
      ethosu: false
  riscv_qemu:
    enabled: false
    features:
      vext: false
  vicuna:
    enabled: false
    features:
      vext: true
  microtvm_host:
    enabled: true
  microtvm_spike:
    enabled: true
  microtvm_zephyr:
    enabled: false
  microtvm_arduino:
    enabled: false
  microtvm_etiss:
    enabled: true
  # microtvm_espidf:
  #   enabled: true
  tvm_cpu:
    enabled: true
  # esp32:
  #   enabled: true
  # esp32c3:
  #   enabled: true
# Some targets/platforms support multiple toolchains
toolchains:
  gcc: true
  llvm: true
platforms:
  mlif:
    enabled: true
    features:
      debug: true
      validate: true
  tvm:
    enabled: true
    features:
      benchmark: true
      tvm_rpc: true
      autotvm: true
      tvm_profile: true
  microtvm:
    enabled: true
    features:
      autotvm: true
      benchmark: true
      tvm_profile: true
  # espidf:
  #   enabled: true
  #   features:
  #     debug: true
  # zephyr:
  #   enabled: true
  #   features:
  #     debug: true
postprocesses:
  use:
  # - detailed_cycles
  # - average_cycles
  # - filter_cols
  # - features2cols
  # - config2cols
  # - bytes2kb
  # - visualize
# This is where further options such as specific versions of dependencies can be set in the furture
vars:
  allow_extensions: false
  runs_per_stage: true
  # tvm.make_tool: "ninja"
  # llvm.version: "16.0.0"
  llvm.dl_url: "https://syncandshare.lrz.de/dl/fiWBtDLWz17RBc1Yd4VDW7/LLVM/default/Archive/llvm16.tar.xz"
  riscv_gcc.dl_url: "https://syncandshare.lrz.de/dl/fiWBtDLWz17RBc1Yd4VDW7/GCC/default/2023.11.27/Ubuntu/20.04/rv32gc_ilp32d.tar.xz"
  riscv_gcc.dl_url_vext: "https://syncandshare.lrz.de/dl/fiWBtDLWz17RBc1Yd4VDW7/GCC/default/2023.11.27/Ubuntu/20.04/rv32gcv_ilp32d.tar.xz"
  riscv_gcc.dl_url_pext: "https://syncandshare.lrz.de/dl/fiWBtDLWz17RBc1Yd4VDW7/GCC/pext/2022.04.28/Ubuntu/20.04/rv32gcp_ilp32d.tar.xz"
  spike.keep_build_dir: false
  etiss.keep_build_dir: false
flags:
  tflmc.exe:
  - x86
