Skip to content

mlonmcu/setup/tasks/riscv_gcc.py: fix _validate_riscv_gcc #869

mlonmcu/setup/tasks/riscv_gcc.py: fix _validate_riscv_gcc

mlonmcu/setup/tasks/riscv_gcc.py: fix _validate_riscv_gcc #869

GitHub Actions / Black failed Jan 22, 2025 in 0s

5 errors

Black found 5 errors

Annotations

Check failure on line 79 in /home/runner/work/mlonmcu/mlonmcu/scripts/gen_muriscnn_benchmarks.py

See this annotation in the file changed.

@github-actions github-actions / Black

/home/runner/work/mlonmcu/mlonmcu/scripts/gen_muriscnn_benchmarks.py#L68-L79

                         else ("Reference" if "tflm" in row.get("Backend") else "-")
                     )
                 )
                 if not (row.get("feature_muriscvnn") or row.get("feature_muriscvnnbyoc"))
                 else (
-                    "Vector" + (" (Portable)" if row.get("config_muriscvnn.use_portable") == 1 or row.get("config_muriscvnnbyoc.use_portable") == 1 else "")
+                    "Vector"
+                    + (
+                        " (Portable)"
+                        if row.get("config_muriscvnn.use_portable") == 1
+                        or row.get("config_muriscvnnbyoc.use_portable") == 1
+                        else ""
+                    )
                     if row.get("config_muriscvnn.use_vext") == 1 or row.get("config_muriscvnnbyoc.use_vext") == 1
                     else (
                         "Packed"
                         if row.get("config_muriscvnn.use_pext") == 1 or row.get("config_muriscvnnbyoc.use_pext") == 1
                         else "Scalar"

Check failure on line 234 in /home/runner/work/mlonmcu/mlonmcu/scripts/gen_muriscnn_benchmarks.py

See this annotation in the file changed.

@github-actions github-actions / Black

/home/runner/work/mlonmcu/mlonmcu/scripts/gen_muriscnn_benchmarks.py#L219-L234

     MURISCVNN_PEXT = [["muriscvnn", "pext"] if enable_pext else []]
     CMSISNN_SCALAR = [["cmsisnn"] if enable_scalar else []]
     CMSISNN_DSP = [["cmsisnn", "arm_dsp"] if enable_dsp else []]
     CMSISNN_MVEI = [["cmsisnn", "arm_mvei", "arm_dsp"] if enable_mvei else []]
     TARGET_FEATURES = {
-        **{t: [
-            *([*DEFAULT_SCALAR, *DEFAULT_VEXT, *DEFAULT_PEXT] if enable_default else []),
-            *([*MURISCVNN_SCALAR, *MURISCVNN_VEXT, *MURISCVNN_PEXT] if enable_muriscvnn else []),
-            *([*CMSISNN_SCALAR] if enable_cmsisnn else []),
-        ] for t in SPIKE_TARGETS},
+        **{
+            t: [
+                *([*DEFAULT_SCALAR, *DEFAULT_VEXT, *DEFAULT_PEXT] if enable_default else []),
+                *([*MURISCVNN_SCALAR, *MURISCVNN_VEXT, *MURISCVNN_PEXT] if enable_muriscvnn else []),
+                *([*CMSISNN_SCALAR] if enable_cmsisnn else []),
+            ]
+            for t in SPIKE_TARGETS
+        },
         "canmv_k230_ssh": [
             *([*DEFAULT_SCALAR, *DEFAULT_VEXT] if enable_default else []),
             *([*MURISCVNN_SCALAR, *MURISCVNN_VEXT] if enable_muriscvnn else []),
             *([*CMSISNN_SCALAR] if enable_cmsisnn else []),
         ],

Check failure on line 361 in /home/runner/work/mlonmcu/mlonmcu/scripts/gen_muriscnn_benchmarks.py

See this annotation in the file changed.

@github-actions github-actions / Black

/home/runner/work/mlonmcu/mlonmcu/scripts/gen_muriscnn_benchmarks.py#L350-L361

 BACKEND_DEFAULT_CONFIG = {
     "tflmi": {},
     "tvmaot": {"usmp.algorithm": "hill_climb"},
     "tvmaotplus": {"usmp.algorithm": "hill_climb"},
     "tvmrt": {},
-    "tvmllvm": {}
+    "tvmllvm": {},
 }
 
 VLENS = [64, 128, 256, 512, 1024, 2048, 4096, 8192]
 
 DEFAULT_VLENS = [64, 128, 256, 512, 1024, 2048]

Check failure on line 723 in /home/runner/work/mlonmcu/mlonmcu/scripts/gen_muriscnn_benchmarks.py

See this annotation in the file changed.

@github-actions github-actions / Black

/home/runner/work/mlonmcu/mlonmcu/scripts/gen_muriscnn_benchmarks.py#L712-L723

                                                                 run.add_model_by_name(model, context=context)
                                                                 run.add_backend_by_name(backend, context=context)
                                                                 run.add_target_by_name(target, context=context)
                                                                 if args.post:
                                                                     run.add_postprocesses_by_name(POSTPROCESSES_0)
-                                                                    run.add_postprocess(CustomPostprocess(), append=True)
+                                                                    run.add_postprocess(
+                                                                        CustomPostprocess(), append=True
+                                                                    )
                                                                     run.add_postprocesses_by_name(
                                                                         POSTPROCESSES_1, append=True
                                                                     )
                                                                     if args.baseline is not None:
                                                                         run.add_postprocess_by_name(

Check failure on line 736 in /home/runner/work/mlonmcu/mlonmcu/scripts/gen_muriscnn_benchmarks.py

See this annotation in the file changed.

@github-actions github-actions / Black

/home/runner/work/mlonmcu/mlonmcu/scripts/gen_muriscnn_benchmarks.py#L725-L736

             if args.noop:
                 stage = RunStage.LOAD
             else:
                 stage = RunStage.RUN
             success = session.process_runs(
-                until=stage, num_workers=args.parallel, progress=args.progress, context=context, per_stage=args.runs_per_stage,
+                until=stage,
+                num_workers=args.parallel,
+                progress=args.progress,
+                context=context,
+                per_stage=args.runs_per_stage,
             )
             report = session.get_reports()
         report_file = args.output
         report.export(report_file)
         print()