offtarget 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- offload/__init__.py +10 -0
- offload/__main__.py +5 -0
- offload/_bundle.py +74 -0
- offload/_root/catalog/acc/claims.yaml +197 -0
- offload/_root/catalog/acc/clauses.yaml +391 -0
- offload/_root/catalog/acc/no_oracle.yaml +89 -0
- offload/_root/catalog/acc/out_of_scope.yaml +17 -0
- offload/_root/catalog/acc/rules.yaml +433 -0
- offload/_root/catalog/acc/semantic_atoms.yaml +27 -0
- offload/_root/catalog/acc/skeleton.yaml +1567 -0
- offload/_root/catalog/acc/spec_overrides.yaml +72 -0
- offload/_root/catalog/later_forms.yaml +76 -0
- offload/_root/catalog/machines.yaml +218 -0
- offload/_root/catalog/omp/claims.yaml +2047 -0
- offload/_root/catalog/omp/clauses.yaml +914 -0
- offload/_root/catalog/omp/derivations.yaml +177 -0
- offload/_root/catalog/omp/memory_modes.yaml +40 -0
- offload/_root/catalog/omp/no_oracle.yaml +373 -0
- offload/_root/catalog/omp/omp50_delta.yaml +377 -0
- offload/_root/catalog/omp/out_of_scope.yaml +64 -0
- offload/_root/catalog/omp/port_equivalence.yaml +352 -0
- offload/_root/catalog/omp/rules.yaml +3131 -0
- offload/_root/catalog/omp/rules_coverage.yaml +9939 -0
- offload/_root/catalog/omp/semantic_atoms.yaml +34 -0
- offload/_root/catalog/omp/skeleton.yaml +9181 -0
- offload/_root/catalog/omp/spec_overrides.yaml +932 -0
- offload/_root/catalog/toolchains.yaml +472 -0
- offload/_root/catalog/vendor_claims_generic.yaml +40925 -0
- offload/_root/data/canuse/b.json +1 -0
- offload/_root/data/canuse/c.json +1 -0
- offload/_root/data/canuse/columns.json +1 -0
- offload/_root/data/canuse/d.json +1 -0
- offload/_root/data/canuse/f.json +1 -0
- offload/_root/data/canuse/index.json +1 -0
- offload/_root/data/canuse/p.json +1 -0
- offload/_root/data/compilers/afar.json +1 -0
- offload/_root/data/compilers/cce19.json +1 -0
- offload/_root/data/compilers/cce20.json +1 -0
- offload/_root/data/compilers/cce21.json +1 -0
- offload/_root/data/compilers/cce21_4.json +1 -0
- offload/_root/data/compilers/gcc.json +1 -0
- offload/_root/data/compilers/gcc_sm80.json +1 -0
- offload/_root/data/compilers/nvhpc.json +1 -0
- offload/_root/data/compilers/nvhpc269.json +1 -0
- offload/_root/data/findings/AUTHORING.md +107 -0
- offload/_root/data/findings/README.md +33 -0
- offload/_root/data/findings/afar-c-error-directive-in-target-link.c +37 -0
- offload/_root/data/findings/afar-c-lastprivate-distribute-parallel-for-small-type.c +56 -0
- offload/_root/data/findings/afar-c-teams-distribute-reduction-first-team.c +59 -0
- offload/_root/data/findings/afar-c-update-iterator-copy-mode.c +45 -0
- offload/_root/data/findings/afar-c-xnack1-target-is-present.c +31 -0
- offload/_root/data/findings/afar-cce19-character-defaultmap.f90 +27 -0
- offload/_root/data/findings/afar-cce19-task-in-target-ice.f90 +23 -0
- offload/_root/data/findings/afar-clang-requires-device-safesync-hang.c +24 -0
- offload/_root/data/findings/afar-flang-firstprivate-map-two-targets.f90 +34 -0
- offload/_root/data/findings/afar-flang-loop-bind-teams-reduction.f90 +27 -0
- offload/_root/data/findings/afar-flang-task-reduction-max.f90 +31 -0
- offload/_root/data/findings/afar-flang-thread-limit-target-parallel-do.f90 +22 -0
- offload/_root/data/findings/afar-linear-ref-omp50.f90 +29 -0
- offload/_root/data/findings/afar-loop-bind-thread-in-teams.f90 +44 -0
- offload/_root/data/findings/afar-nontemporal-assumed-shape-ice.f90 +38 -0
- offload/_root/data/findings/afar-udr-derived-type-link.f90 +41 -0
- offload/_root/data/findings/afar-xnack1-atomic-min-nested-parallel.f90 +53 -0
- offload/_root/data/findings/afar-xnack1-present-not-enforced.f90 +36 -0
- offload/_root/data/findings/afar-xnack1-target-is-present.f90 +47 -0
- offload/_root/data/findings/apps/afar-cce-teams-private-array-nested-parallel-wrong.f90 +100 -0
- offload/_root/data/findings/apps/cce20-device-link-infer-address-spaces-crash.f90 +159 -0
- offload/_root/data/findings/apps/cce21-device-link-agpr-copy-mfma-assert.f90 +343 -0
- offload/_root/data/findings/apps/cce21-private-array-loaded-subscript-wrong.f90 +113 -0
- offload/_root/data/findings/apps/controls/bubble-simple-rddot.f90 +284 -0
- offload/_root/data/findings/apps/controls/bubble-two-substeps.f90 +287 -0
- offload/_root/data/findings/apps/controls/cbc-inline.f90 +97 -0
- offload/_root/data/findings/apps/controls/cbc-integers.f90 +91 -0
- offload/_root/data/findings/apps/controls/cbc-only-density.f90 +97 -0
- offload/_root/data/findings/apps/controls/cbc-only-velocity.f90 +97 -0
- offload/_root/data/findings/apps/controls/gcc-acc-c-tile-control.c +26 -0
- offload/_root/data/findings/apps/controls/gcc-acc-tile-control.f90 +29 -0
- offload/_root/data/findings/apps/controls/private-array-subscript-probes.f90 +45 -0
- offload/_root/data/findings/apps/controls/teams-private-array-read-par.f90 +31 -0
- offload/_root/data/findings/apps/controls/teams-private-array-seq.f90 +30 -0
- offload/_root/data/findings/apps/controls/teams-private-array-shared.f90 +34 -0
- offload/_root/data/findings/apps/controls/teams-private-array-split.f90 +36 -0
- offload/_root/data/findings/apps/controls/teams-private-array-write-par.f90 +31 -0
- offload/_root/data/findings/apps/gcc-acc-c-tile-partial-tiles-wrong.c +60 -0
- offload/_root/data/findings/apps/gcc-acc-tile-partial-tiles-wrong.f90 +64 -0
- offload/_root/data/findings/catalog/afar-c-complex-reduction-link.c +66 -0
- offload/_root/data/findings/catalog/afar-c-critical-hint-link.c +68 -0
- offload/_root/data/findings/catalog/afar-c-ordered-doacross-link.c +62 -0
- offload/_root/data/findings/catalog/afar-c-reduction-task-link.c +81 -0
- offload/_root/data/findings/catalog/afar-flang-absent-optional-target-crash.f90 +76 -0
- offload/_root/data/findings/catalog/afar-flang-critical-target-parallel-wrong.f90 +74 -0
- offload/_root/data/findings/catalog/afar-flang-dist-schedule-chunk.f90 +80 -0
- offload/_root/data/findings/catalog/afar-flang-linear-parallel-ice.f90 +68 -0
- offload/_root/data/findings/catalog/afar-flang-named-critical-link.f90 +67 -0
- offload/_root/data/findings/catalog/afar-flang-ordered-wrong.f90 +78 -0
- offload/_root/data/findings/catalog/afar-flang-reduction-minus-rejected.f90 +77 -0
- offload/_root/data/findings/catalog/afar-flang-reduction-task-ice.f90 +68 -0
- offload/_root/data/findings/catalog/afar-flang-sections-in-target-ice.f90 +67 -0
- offload/_root/data/findings/catalog/afar-flang-workdistribute-ice.f90 +71 -0
- offload/_root/data/findings/catalog/c-allocate-const-mem-firstprivate-wrong.c +79 -0
- offload/_root/data/findings/catalog/cce-acc-allocate-in-compute-crash.f90 +65 -0
- offload/_root/data/findings/catalog/cce-acc-character-dummy-routine-ice.f90 +81 -0
- offload/_root/data/findings/catalog/cce-acc-loop-seq-in-routine-wrong.f90 +81 -0
- offload/_root/data/findings/catalog/cce-acc-stop-in-compute-crash.f90 +62 -0
- offload/_root/data/findings/catalog/cce-allocators-stack-ice.f90 +81 -0
- offload/_root/data/findings/catalog/cce-atomic-default-mem-order-acquire-release-rejected.f90 +61 -0
- offload/_root/data/findings/catalog/cce-c-allocate-align-link.c +83 -0
- offload/_root/data/findings/catalog/cce-c-allocate-allocator-modifier-rejected.c +77 -0
- offload/_root/data/findings/catalog/cce-c-device-type-directive-name-ice.c +70 -0
- offload/_root/data/findings/catalog/cce-c-dist-schedule-chunk.c +81 -0
- offload/_root/data/findings/catalog/cce-c-f-pointer-device-link.f90 +70 -0
- offload/_root/data/findings/catalog/cce-c-lastprivate-parallel-in-seq-loop-wrong.c +64 -0
- offload/_root/data/findings/catalog/cce-c-long-double-ice.c +61 -0
- offload/_root/data/findings/catalog/cce-c-map-iterator-ice.c +92 -0
- offload/_root/data/findings/catalog/cce-c-motion-iterator-rejected.c +68 -0
- offload/_root/data/findings/catalog/cce-c-ordered-doacross-link.c +64 -0
- offload/_root/data/findings/catalog/cce-c-ordered-link.c +77 -0
- offload/_root/data/findings/catalog/cce-c-recursive-function-ice.c +62 -0
- offload/_root/data/findings/catalog/cce-c-reduction-inscan-ice.c +67 -0
- offload/_root/data/findings/catalog/cce-c-reduction-task-link.c +73 -0
- offload/_root/data/findings/catalog/cce-c-sections-in-target-wrong.c +70 -0
- offload/_root/data/findings/catalog/cce-c-single-masked-task-link.c +66 -0
- offload/_root/data/findings/catalog/cce-c-task-in-target-link.c +75 -0
- offload/_root/data/findings/catalog/cce-c-uses-allocators-traits-rejected.c +71 -0
- offload/_root/data/findings/catalog/cce-flang-allocate-const-mem-ice.f90 +67 -0
- offload/_root/data/findings/catalog/cce-flang-allocate-in-target-crash.f90 +68 -0
- offload/_root/data/findings/catalog/cce-flang-lastprivate-parallel-in-seq-loop-wrong.f90 +83 -0
- offload/_root/data/findings/catalog/cce-flang-stop-in-target-crash.f90 +64 -0
- offload/_root/data/findings/catalog/cce-iterator-link.f90 +67 -0
- offload/_root/data/findings/catalog/cce-linear-lastprivate-ice.f90 +69 -0
- offload/_root/data/findings/catalog/cce-nohost-link.f90 +90 -0
- offload/_root/data/findings/catalog/cce-reduction-inscan-ice.f90 +66 -0
- offload/_root/data/findings/catalog/cce-reduction-task-link.f90 +76 -0
- offload/_root/data/findings/catalog/cce19-reduction-task-addrspacecast-ice.f90 +77 -0
- offload/_root/data/findings/catalog/cce20-c-defaultmap-private-storage-rejected.c +85 -0
- offload/_root/data/findings/catalog/cce20-map-self-rejected.f90 +64 -0
- offload/_root/data/findings/catalog/cce21-c-declare-target-local-rejected.c +73 -0
- offload/_root/data/findings/catalog/cce21-c-target-loop-ice.c +77 -0
- offload/_root/data/findings/catalog/defaultmap-present-private-array-abort.f90 +73 -0
- offload/_root/data/findings/catalog/nvhpc-acc-associate-illegal-address.f90 +66 -0
- offload/_root/data/findings/catalog/nvhpc-c-function-pointer-kernel-missing.c +68 -0
- offload/_root/data/findings/catalog/nvhpc-c-long-double-kernel-missing.c +64 -0
- offload/_root/data/findings/catalog/nvhpc-c-static-local-kernel-missing.c +73 -0
- offload/_root/data/findings/catalog/nvhpc-c-vla-kernel-missing.c +63 -0
- offload/_root/data/findings/catalog/nvhpc-flang-type-bound-kernel-missing.f90 +86 -0
- offload/_root/data/findings/cce-acc-init-set-runtime-assert.f90 +35 -0
- offload/_root/data/findings/cce-acc-reduction-200-int8-scalars-wrong.f90 +1278 -0
- offload/_root/data/findings/cce-acc-routine-bind-module-ice.f90 +35 -0
- offload/_root/data/findings/cce-acc-self-condition-ignored.f90 +17 -0
- offload/_root/data/findings/cce-c-dist-schedule-segv.c +34 -0
- offload/_root/data/findings/cce-c-map-delete-refcount.c +47 -0
- offload/_root/data/findings/cce-c-map-present-assert.c +45 -0
- offload/_root/data/findings/cce-c-openmp45-device-link.c +34 -0
- offload/_root/data/findings/cce-c-parallel-for-in-target.c +73 -0
- offload/_root/data/findings/cce-defaultmap-tofrom-explicit-map.f90 +92 -0
- offload/_root/data/findings/cce-mapper-next-map-copy-back.f90 +48 -0
- offload/_root/data/findings/cce-trim-merge-output-one-character.f90 +40 -0
- offload/_root/data/findings/cce-uses-allocators-traits-omp50.f90 +28 -0
- offload/_root/data/findings/cce19-acc-if-false-link.f90 +17 -0
- offload/_root/data/findings/cce19-c-reduction-63-scalars-one-wrong.c +235 -0
- offload/_root/data/findings/cce19-target-parallel-guarded-loop.f90 +35 -0
- offload/_root/data/findings/cce19-target-parallel-single-ice.f90 +38 -0
- offload/_root/data/findings/cce21-alloc-2e32-sum-wrong.f90 +68 -0
- offload/_root/data/findings/cce21-defaultmap-aggregate-flag.f90 +52 -0
- offload/_root/data/findings/cce21-in-reduction-assumed-shape-write-lost.f90 +61 -0
- offload/_root/data/findings/cce21-in-reduction-taskwait-link.f90 +59 -0
- offload/_root/data/findings/cce21-linear-modifier-default-none.f90 +59 -0
- offload/_root/data/findings/clang-c-declare-target-to-omp52.c +50 -0
- offload/_root/data/findings/clang-c-linear-directive-name-hang.c +30 -0
- offload/_root/data/findings/clang-c-map-iterator-omp51.c +51 -0
- offload/_root/data/findings/clang-c-shared-declare-target-combined.c +58 -0
- offload/_root/data/findings/dataenv/cce-value-dummy-target-write-visible.f90 +74 -0
- offload/_root/data/findings/defaultmap-none-loop-variable.f90 +69 -0
- offload/_root/data/findings/fortran-loop-bind-thread-in-parallel.f90 +53 -0
- offload/_root/data/findings/fortran-schedule-static-in-target.f90 +55 -0
- offload/_root/data/findings/fresh/cce-common-block-name-in-map-rejected.f90 +47 -0
- offload/_root/data/findings/fresh/cce-if-stop-in-target-ice-one-condition.f90 +38 -0
- offload/_root/data/findings/fresh/cce-if-stop-in-target-ice.f90 +43 -0
- offload/_root/data/findings/fresh/cce-list-directed-print-in-target-copy-crash.f90 +40 -0
- offload/_root/data/findings/fresh/cce19-acc-automatic-array-copyout-copy-crash.f90 +56 -0
- offload/_root/data/findings/fresh/cce21-combined-if-runtime-expr-loop-skipped.f90 +57 -0
- offload/_root/data/findings/fresh/nvhpc-acc-gang-worker-collapse-nested-vector-reduction-lost.f90 +67 -0
- offload/_root/data/findings/fresh/nvhpc-teams-loop-module-allocatable-assign-fort2-crash.f90 +73 -0
- offload/_root/data/findings/fuzz/1131-afar.f90 +48 -0
- offload/_root/data/findings/fuzz/1391-cce20.f90 +40 -0
- offload/_root/data/findings/fuzz/14-cce20.f90 +36 -0
- offload/_root/data/findings/fuzz/1505-cce20.f90 +88 -0
- offload/_root/data/findings/fuzz/1540-afar.f90 +44 -0
- offload/_root/data/findings/fuzz/158-afar.f90 +63 -0
- offload/_root/data/findings/fuzz/16-cce20.f90 +39 -0
- offload/_root/data/findings/fuzz/1644-cce21.f90 +31 -0
- offload/_root/data/findings/fuzz/165-cce19.f90 +52 -0
- offload/_root/data/findings/fuzz/1749-cce20.f90 +34 -0
- offload/_root/data/findings/fuzz/1936-afar.f90 +61 -0
- offload/_root/data/findings/fuzz/1978-cce19.f90 +41 -0
- offload/_root/data/findings/fuzz/2014-cce19.f90 +46 -0
- offload/_root/data/findings/fuzz/2224-cce19.f90 +30 -0
- offload/_root/data/findings/fuzz/2334-cce19.f90 +57 -0
- offload/_root/data/findings/fuzz/536-cce19.f90 +38 -0
- offload/_root/data/findings/fuzz/591-cce19.f90 +54 -0
- offload/_root/data/findings/fuzz/650-afar.f90 +58 -0
- offload/_root/data/findings/fuzz/698-afar.f90 +68 -0
- offload/_root/data/findings/fuzz/700-afar.f90 +46 -0
- offload/_root/data/findings/fuzz/775-cce21.f90 +33 -0
- offload/_root/data/findings/fuzz/87-afar.f90 +47 -0
- offload/_root/data/findings/fuzz/916-afar.f90 +67 -0
- offload/_root/data/findings/fuzz/958-cce20.f90 +44 -0
- offload/_root/data/findings/fuzz/98-cce19.f90 +40 -0
- offload/_root/data/findings/fuzz/README.md +236 -0
- offload/_root/data/findings/fuzz/b1-121-afar.f90 +47 -0
- offload/_root/data/findings/fuzz/b1-183-afar.f90 +55 -0
- offload/_root/data/findings/fuzz/b1-22-cce20.f90 +38 -0
- offload/_root/data/findings/fuzz/b1-231-afar.f90 +56 -0
- offload/_root/data/findings/fuzz/b1-268-afar.f90 +46 -0
- offload/_root/data/findings/fuzz/b2-183-afar.f90 +57 -0
- offload/_root/data/findings/fuzz/b2-209-cce19.f90 +51 -0
- offload/_root/data/findings/fuzz/b2-213-afar.f90 +63 -0
- offload/_root/data/findings/fuzz/b2-52-afar.f90 +56 -0
- offload/_root/data/findings/fuzz/b2-68-afar.f90 +54 -0
- offload/_root/data/findings/fuzz/b2-85-cce20.f90 +55 -0
- offload/_root/data/findings/fuzz/b3-188-cce19.f90 +90 -0
- offload/_root/data/findings/fuzz/b3-190-cce21.f90 +88 -0
- offload/_root/data/findings/fuzz/b3-197-cce19.f90 +77 -0
- offload/_root/data/findings/fuzz/b3-250-cce20.f90 +89 -0
- offload/_root/data/findings/fuzz/b3-278-cce19.f90 +70 -0
- offload/_root/data/findings/fuzz/b3-45-cce21.f90 +83 -0
- offload/_root/data/findings/fuzz/b3-54-afar.f90 +67 -0
- offload/_root/data/findings/fuzz/b3-61-cce20.f90 +100 -0
- offload/_root/data/findings/fuzz/b3-9-afar.f90 +100 -0
- offload/_root/data/findings/fuzz/b3-9-cce21.f90 +103 -0
- offload/_root/data/findings/fuzz/b3-94-afar.f90 +80 -0
- offload/_root/data/findings/fuzz/b4-39-afar.f90 +141 -0
- offload/_root/data/findings/fuzz/b4-86-cce19.f90 +71 -0
- offload/_root/data/findings/fuzz/controls/gcc-complex-pointer-store-control.f90 +28 -0
- offload/_root/data/findings/fuzz/controls/gcc-declare-reduction-module-control.f90 +29 -0
- offload/_root/data/findings/fuzz/controls/gcc-target-simd-map-nontemporal-control.f90 +21 -0
- offload/_root/data/findings/fuzz/controls/nvhpc-allocatable-component-mapped-control.f90 +22 -0
- offload/_root/data/findings/fuzz/controls/nvhpc-allocatable-component-unreferenced-control.f90 +22 -0
- offload/_root/data/findings/fuzz/controls/nvhpc-default-none-removed-control.f90 +18 -0
- offload/_root/data/findings/fuzz/controls/nvhpc-default-shared-control.f90 +18 -0
- offload/_root/data/findings/fuzz/controls/nvhpc-defaultmap-firstprivate-removed-control.f90 +15 -0
- offload/_root/data/findings/fuzz/controls/nvhpc-defaultmap-to-scalar-reduction-mapped-control.f90 +17 -0
- offload/_root/data/findings/fuzz/controls/nvhpc-defaultmap-to-scalar-removed-control.f90 +17 -0
- offload/_root/data/findings/fuzz/controls/nvhpc-defaultmap-tofrom-lastprivate-control.f90 +15 -0
- offload/_root/data/findings/fuzz/controls/nvhpc-depend-explicit-map-control.f90 +22 -0
- offload/_root/data/findings/fuzz/controls/nvhpc-depend-removed-control.f90 +22 -0
- offload/_root/data/findings/fuzz/controls/nvhpc-distribute-end-distribute-control.f90 +16 -0
- offload/_root/data/findings/fuzz/controls/nvhpc-distribute-parallel-num-threads-removed-control.f90 +26 -0
- offload/_root/data/findings/fuzz/controls/nvhpc-distribute-parallel-removed-control.f90 +22 -0
- offload/_root/data/findings/fuzz/controls/nvhpc-distribute-simd-no-end-directive-control.f90 +15 -0
- offload/_root/data/findings/fuzz/controls/nvhpc-explicit-length-character-dummy-control.f90 +18 -0
- offload/_root/data/findings/fuzz/controls/nvhpc-loop-character-array-value-control.f90 +23 -0
- offload/_root/data/findings/fuzz/controls/nvhpc-loop-character-distribute-control.f90 +20 -0
- offload/_root/data/findings/fuzz/controls/nvhpc-map-always-first-control.f90 +15 -0
- offload/_root/data/findings/fuzz/controls/nvhpc-map-always-removed-control.f90 +15 -0
- offload/_root/data/findings/fuzz/controls/nvhpc-num-threads-removed-control.f90 +12 -0
- offload/_root/data/findings/fuzz/controls/nvhpc-target-parallel-firstprivate-dropped-control.f90 +15 -0
- offload/_root/data/findings/fuzz/controls/nvhpc-target-parallel-single-nowait-control.f90 +13 -0
- offload/_root/data/findings/fuzz/controls/nvhpc-target-parallel-split-control.f90 +15 -0
- offload/_root/data/findings/fuzz/controls/nvhpc-target-simd-collapse-split-control.f90 +21 -0
- offload/_root/data/findings/fuzz/controls/nvhpc-target-simd-end-directive-control.f90 +14 -0
- offload/_root/data/findings/fuzz/controls/nvhpc-target-simd-no-collapse-control.f90 +19 -0
- offload/_root/data/findings/fuzz/controls/nvhpc-target-simd-split-no-end-directive-control.f90 +15 -0
- offload/_root/data/findings/fuzz/gcc-declare-reduction-module-not-found.f90 +66 -0
- offload/_root/data/findings/fuzz/gcc-strided-target-update-rejected.f90 +58 -0
- offload/_root/data/findings/fuzz/gcc-target-simd-map-nontemporal-rejected.f90 +54 -0
- offload/_root/data/findings/fuzz/nvhpc-allocatable-component-implicit-map-illegal-address.f90 +84 -0
- offload/_root/data/findings/fuzz/nvhpc-assumed-length-character-dummy-map-ice.f90 +69 -0
- offload/_root/data/findings/fuzz/nvhpc-default-none-reduction-lastprivate-fort1-crash.f90 +70 -0
- offload/_root/data/findings/fuzz/nvhpc-defaultmap-firstprivate-lastprivate-ice.f90 +71 -0
- offload/_root/data/findings/fuzz/nvhpc-defaultmap-to-scalar-reduction-lost.f90 +82 -0
- offload/_root/data/findings/fuzz/nvhpc-depend-implicit-map-illegal-address.f90 +81 -0
- offload/_root/data/findings/fuzz/nvhpc-distribute-parallel-num-threads-writes-lost.f90 +79 -0
- offload/_root/data/findings/fuzz/nvhpc-end-distribute-simd-rejected.f90 +70 -0
- offload/_root/data/findings/fuzz/nvhpc-loop-character-achar-unsupported.f90 +75 -0
- offload/_root/data/findings/fuzz/nvhpc-map-always-after-map-to-not-copied-back.f90 +70 -0
- offload/_root/data/findings/fuzz/nvhpc-num-threads-reduction-identity-lost.f90 +54 -0
- offload/_root/data/findings/fuzz/nvhpc-target-parallel-firstprivate-translate-failure.f90 +66 -0
- offload/_root/data/findings/fuzz/nvhpc-target-parallel-single-hang.f90 +68 -0
- offload/_root/data/findings/fuzz/nvhpc-target-simd-collapse-translate-failure.f90 +73 -0
- offload/_root/data/findings/fuzz/nvhpc-target-simd-no-end-directive-rejected.f90 +68 -0
- offload/_root/data/findings/fuzz/par-s1-2082-gcc_g90.f90 +71 -0
- offload/_root/data/findings/fuzz/s1-2370-cce21.f90 +67 -0
- offload/_root/data/findings/fuzz/s1-2592-cce21.f90 +56 -0
- offload/_root/data/findings/fuzz/s1-3463-cce21.f90 +92 -0
- offload/_root/data/findings/fuzz/s1-4339-afar.f90 +79 -0
- offload/_root/data/findings/fuzz/s1-6085-cce21.f90 +96 -0
- offload/_root/data/findings/fuzz/s1-6760-cce20.f90 +65 -0
- offload/_root/data/findings/fuzz/s1-6888-cce21.f90 +76 -0
- offload/_root/data/findings/fuzz/s1-7882-cce20.f90 +63 -0
- offload/_root/data/findings/fuzz/s1-8634-cce21.f90 +45 -0
- offload/_root/data/findings/fuzz/s1-91-cce21.f90 +92 -0
- offload/_root/data/findings/fuzz/s1-9443-afar.f90 +59 -0
- offload/_root/data/findings/fuzz/s1-9914-cce19.f90 +78 -0
- offload/_root/data/findings/gcc/controls/gcc-acc-c-detach-control.c +34 -0
- offload/_root/data/findings/gcc/controls/gcc-acc-detach-control.f90 +26 -0
- offload/_root/data/findings/gcc/controls/gcc-defaultmap-to-pointer-control.f90 +31 -0
- offload/_root/data/findings/gcc/controls/gcc-target-in-task-control.c +26 -0
- offload/_root/data/findings/gcc/controls/gcc-target-in-task-control.f90 +21 -0
- offload/_root/data/findings/gcc/gcc-acc-bind-device-type-rejected.f90 +71 -0
- offload/_root/data/findings/gcc/gcc-acc-c-bind-device-type-rejected.c +76 -0
- offload/_root/data/findings/gcc/gcc-acc-c-detach-delete-attach-underflow.c +74 -0
- offload/_root/data/findings/gcc/gcc-acc-c-gang-dim-rejected.c +79 -0
- offload/_root/data/findings/gcc/gcc-acc-c-link-in-routine-rejected.c +82 -0
- offload/_root/data/findings/gcc/gcc-acc-detach-delete-attach-underflow.f90 +66 -0
- offload/_root/data/findings/gcc/gcc-acc-gang-dim-collapse-force-rejected.f90 +69 -0
- offload/_root/data/findings/gcc/gcc-acc-init-set-shutdown-rejected.f90 +70 -0
- offload/_root/data/findings/gcc/gcc-acc-link-in-routine-rejected.f90 +82 -0
- offload/_root/data/findings/gcc/gcc-acc-use-device-allocatable-rejected.f90 +88 -0
- offload/_root/data/findings/gcc/gcc-c-motion-mapper-rejected.c +110 -0
- offload/_root/data/findings/gcc/gcc-c-omp60-undocumented-rejected.c +76 -0
- offload/_root/data/findings/gcc/gcc-c-omp60-unimplemented-rejected.c +119 -0
- offload/_root/data/findings/gcc/gcc-c-target-in-task-mandatory-device-not-found.c +87 -0
- offload/_root/data/findings/gcc/gcc-c-uses-allocators-traits-unimplemented.c +85 -0
- offload/_root/data/findings/gcc/gcc-declare-mapper-rejected.f90 +85 -0
- offload/_root/data/findings/gcc/gcc-defaultmap-to-pointer-copy-back.f90 +66 -0
- offload/_root/data/findings/gcc/gcc-loop-bind-default-none-rejected.f90 +93 -0
- offload/_root/data/findings/gcc/gcc-omp60-undocumented-rejected.f90 +72 -0
- offload/_root/data/findings/gcc/gcc-omp60-unimplemented-rejected.f90 +112 -0
- offload/_root/data/findings/gcc/gcc-target-in-task-mandatory-device-not-found.f90 +83 -0
- offload/_root/data/findings/gcc/gcc-uses-allocators-traits-unimplemented.f90 +78 -0
- offload/_root/data/findings/harvest/afar-flang-strided-target-update.f90 +96 -0
- offload/_root/data/findings/harvest/cce-acc-declare-create-module-allocatable-xnack1-fault.f90 +58 -0
- offload/_root/data/findings/harvest/cce-c-implicit-struct-map-partly-present.c +100 -0
- offload/_root/data/findings/harvest/cce-c-strided-target-update.c +74 -0
- offload/_root/data/findings/harvest/cce-ftn-target-parallel-thread-query-ice.f90 +67 -0
- offload/_root/data/findings/harvest/cce-named-constant-array-declare-target-routine-rejected.f90 +69 -0
- offload/_root/data/findings/harvest/cce-use-device-ptr-c-ptr-not-converted.f90 +64 -0
- offload/_root/data/findings/harvest/cce21-declare-target-link-module-variable-write-lost.f90 +63 -0
- offload/_root/data/findings/harvest/cce21-internal-procedure-calls-internal-in-target-fault.f90 +71 -0
- offload/_root/data/findings/harvest/controls/cce-c-implicit-struct-map-partly-present-target-only-control.c +22 -0
- offload/_root/data/findings/harvest/controls/cce-c-implicit-struct-map-partly-present-whole-control.c +23 -0
- offload/_root/data/findings/harvest/controls/gcc-acc-declare-create-allocatable-control.f90 +34 -0
- offload/_root/data/findings/harvest/controls/gcc-c-same-item-two-maps-control.c +17 -0
- offload/_root/data/findings/harvest/controls/gcc-c-target-data-struct-pointer-section-control.c +27 -0
- offload/_root/data/findings/harvest/controls/gcc-c-target-data-two-maps-control.c +20 -0
- offload/_root/data/findings/harvest/controls/gcc-same-item-two-maps-control.f90 +16 -0
- offload/_root/data/findings/harvest/controls/gcc-teams-simd-matmul-allocatable-control.f90 +27 -0
- offload/_root/data/findings/harvest/gcc-acc-declare-create-allocatable-not-mapped.f90 +66 -0
- offload/_root/data/findings/harvest/gcc-c-same-item-two-maps-rejected.c +45 -0
- offload/_root/data/findings/harvest/gcc-c-strided-section-rejected.c +70 -0
- offload/_root/data/findings/harvest/gcc-c-target-data-struct-pointer-section-ice.c +78 -0
- offload/_root/data/findings/harvest/gcc-c-target-data-two-maps-ice.c +49 -0
- offload/_root/data/findings/harvest/gcc-same-item-two-maps-rejected.f90 +46 -0
- offload/_root/data/findings/harvest/gcc-teams-simd-matmul-allocatable-ice.f90 +53 -0
- offload/_root/data/findings/harvest/nvhpc-c-target-data-if-false-use-device-ptr-garbage.c +49 -0
- offload/_root/data/findings/harvest/nvhpc-named-constant-array-declare-target-routine-rejected.f90 +65 -0
- offload/_root/data/findings/harvest/nvhpc-use-device-ptr-c-ptr-not-found.f90 +60 -0
- offload/_root/data/findings/harvest/nvhpc2511-target-nowait-in-parallel-for-ice.c +59 -0
- offload/_root/data/findings/hecbench/controls/f16-ctl-float-array.c +28 -0
- offload/_root/data/findings/hecbench/controls/pc-ctl-builtin-popcount.c +37 -0
- offload/_root/data/findings/hecbench/controls/pc-ctl-shift-sum.c +43 -0
- offload/_root/data/findings/hecbench/gcc-c-float16-array-in-target-lto-ice.c +65 -0
- offload/_root/data/findings/hecbench/gcc-c-swar-popcount-assembler-error.c +80 -0
- offload/_root/data/findings/index.yaml +2453 -0
- offload/_root/data/findings/malloc/afar-device-malloc-in-kernel-corrupts-records.c +371 -0
- offload/_root/data/findings/malloc/controls/afar-first-use-malloc-direct.c +52 -0
- offload/_root/data/findings/malloc/controls/afar-first-use-malloc-fence.c +57 -0
- offload/_root/data/findings/malloc/controls/afar-first-use-malloc-flush.c +57 -0
- offload/_root/data/findings/malloc/controls/afar-first-use-malloc-stack.c +52 -0
- offload/_root/data/findings/multithread-allocatable-section-maps.f90 +91 -0
- offload/_root/data/findings/nested/afar-cce-c-call-result-member-in-target-rejected.c +69 -0
- offload/_root/data/findings/nested/afar-cce-c-update-struct-and-member-rejected.c +92 -0
- offload/_root/data/findings/nested/afar-flang-pointer-root-allocatable-component-enter-data-fault.f90 +121 -0
- offload/_root/data/findings/nested/cce-c-struct-and-nested-pointee-sections-ice.c +79 -0
- offload/_root/data/findings/nested/cce-fortran-nested-allocatable-component-copy-fault.f90 +64 -0
- offload/_root/data/findings/nested/cce-fortran-pointer-to-type-with-allocatable-scalar-component-typed-transfer.f90 +93 -0
- offload/_root/data/findings/nested/cce-fortran-update-to-pointer-root-allocatable-scalar-component-no-accelerator-object.f90 +80 -0
- offload/_root/data/findings/nested/controls/c3-ctl-nested-data.c +27 -0
- offload/_root/data/findings/nested/controls/c5-acc-serial-struct-and-array.c +26 -0
- offload/_root/data/findings/nested/controls/e2-ctl-two-directives.c +42 -0
- offload/_root/data/findings/nested/controls/e3-ctl-attach-clause.c +42 -0
- offload/_root/data/findings/nested/controls/f3-pointer-array-only.c +33 -0
- offload/_root/data/findings/nested/controls/f5-ctl-copyout-exit.c +33 -0
- offload/_root/data/findings/nested/controls/f6-ctl-pointer-to-struct-array.c +28 -0
- offload/_root/data/findings/nested/controls/g2-ctl-allocatable.f90 +34 -0
- offload/_root/data/findings/nested/controls/g2-ctl-entered-to.f90 +34 -0
- offload/_root/data/findings/nested/controls/g3-ctl-from-struct-no-element.c +27 -0
- offload/_root/data/findings/nested/controls/g3-ptrs-two-elements-to.c +27 -0
- offload/_root/data/findings/nested/controls/g3-ptrs-two-elements-tofrom.c +27 -0
- offload/_root/data/findings/nested/controls/g5-ctl-element-pointers-only.f90 +36 -0
- offload/_root/data/findings/nested/controls/g5-ctl-root-pointer-only.f90 +36 -0
- offload/_root/data/findings/nested/controls/gp2-ctl-no-mapper-explicit-maps.c +24 -0
- offload/_root/data/findings/nested/controls/gt2-ctl-no-always.c +26 -0
- offload/_root/data/findings/nested/controls/gt3-ctl-always-on-structure-only.c +26 -0
- offload/_root/data/findings/nested/controls/j1-embedded-struct-pointer-to-struct.c +24 -0
- offload/_root/data/findings/nested/controls/j2-ctl-pointer-instead-of-embedded.c +24 -0
- offload/_root/data/findings/nested/controls/j6-ctl-struct-and-one-pointee-level.c +23 -0
- offload/_root/data/findings/nested/controls/j7-ctl-struct-and-embedded-pointee.c +24 -0
- offload/_root/data/findings/nested/controls/m2-ctl-variable-root.f90 +32 -0
- offload/_root/data/findings/nested/controls/m3-ctl-fixed-array-component.f90 +32 -0
- offload/_root/data/findings/nested/controls/m5-ctl-no-enter-data.f90 +33 -0
- offload/_root/data/findings/nested/controls/n8-ctl-fixed-array-in-component.f90 +33 -0
- offload/_root/data/findings/nested/controls/n9-ctl-allocatable-in-the-variable.f90 +33 -0
- offload/_root/data/findings/nested/controls/ns4-ctl-two-directives-struct-then-pointee.c +27 -0
- offload/_root/data/findings/nested/controls/ns8-ctl-enter-together-exit-split.c +26 -0
- offload/_root/data/findings/nested/controls/nu3-ctl-update-pointee-only.c +28 -0
- offload/_root/data/findings/nested/controls/p2-ctl-pointer-variable.c +27 -0
- offload/_root/data/findings/nested/controls/p3-ctl-direct-member.c +26 -0
- offload/_root/data/findings/nested/controls/q2-ctl-fixed-array.f90 +37 -0
- offload/_root/data/findings/nested/controls/q3-ctl-allocatable-component-of-the-variable.f90 +38 -0
- offload/_root/data/findings/nested/controls/ta2-ctl-no-allocatable-component.f90 +42 -0
- offload/_root/data/findings/nested/controls/ta3-ctl-allocatable-scalar-in-the-variable.f90 +38 -0
- offload/_root/data/findings/nested/controls/ta4-ctl-pointer-component-only.f90 +42 -0
- offload/_root/data/findings/nested/controls/u3-ctl-update-member-only.c +24 -0
- offload/_root/data/findings/nested/controls/u4-ctl-two-updates.c +25 -0
- offload/_root/data/findings/nested/controls/u5-ctl-same-list-in-map.c +25 -0
- offload/_root/data/findings/nested/controls/ua2-ctl-variable-root.f90 +37 -0
- offload/_root/data/findings/nested/controls/ua4-ctl-to-in-place-of-alloc-and-update.f90 +37 -0
- offload/_root/data/findings/nested/controls/v2-ctl-parent-first.c +25 -0
- offload/_root/data/findings/nested/controls/v4-ctl-embedded-member.c +24 -0
- offload/_root/data/findings/nested/gcc-acc-c-exit-data-of-a-pointer-array-element-target-hangs.c +83 -0
- offload/_root/data/findings/nested/gcc-acc-c-parent-and-shared-pointee-one-directive.c +88 -0
- offload/_root/data/findings/nested/gcc-acc-c-struct-and-member-array-one-directive.c +84 -0
- offload/_root/data/findings/nested/gcc-c-always-on-pointer-member-section-ice.c +75 -0
- offload/_root/data/findings/nested/gcc-c-declare-mapper-pointer-member-section-gpu-fault.c +93 -0
- offload/_root/data/findings/nested/gcc-c-from-struct-and-pointee-section-rejected.c +83 -0
- offload/_root/data/findings/nested/gcc-fortran-pointer-component-alloc-bounds-lost.f90 +62 -0
- offload/_root/data/findings/nested/gcc-fortran-root-and-element-pointer-components-ice.f90 +77 -0
- offload/_root/data/findings/nested/nvhpc-c-pointee-before-parent-in-one-map-list-copy-fault.c +55 -0
- offload/_root/data/findings/nested/nvhpc-c-update-from-structure-overwrites-attached-pointer-segv.c +86 -0
- offload/_root/data/findings/nvhpc-acc-atomic-update-sum-fort2-crash.f90 +53 -0
- offload/_root/data/findings/nvhpc-c-acc-atomic-update-sum-ice.c +43 -0
- offload/_root/data/findings/nvhpc-c-dist-schedule-chunk-compile-hang.c +41 -0
- offload/_root/data/findings/nvhpc-c-map-present-ignored.c +42 -0
- offload/_root/data/findings/nvhpc-c-ordered-in-target-nvcpfe-crash.c +92 -0
- offload/_root/data/findings/nvhpc-c-parallel-for-firstprivate-in-target.c +62 -0
- offload/_root/data/findings/nvhpc-c-parallel-if-in-target-nvvm-ice.c +56 -0
- offload/_root/data/findings/nvhpc-defaultmap-firstprivate-explicit-map.f90 +45 -0
- offload/_root/data/findings/nvhpc-defaultmap-from-allocatable-indexing.f90 +60 -0
- offload/_root/data/findings/nvhpc-depend-inoutset-ignored.f90 +64 -0
- offload/_root/data/findings/nvhpc-dist-schedule-chunk-illegal-address.f90 +52 -0
- offload/_root/data/findings/nvhpc-managed-acc-shutdown-host-access.f90 +42 -0
- offload/_root/data/findings/nvhpc-parallel-if-in-target-nvvm-ice.f90 +60 -0
- offload/_root/data/findings/oop/afar-final-dealloc-device-link.f90 +85 -0
- offload/_root/data/findings/oop/afar-pdt-length-parameter-not-implemented.f90 +65 -0
- offload/_root/data/findings/oop/cce-class-is-device-link.f90 +86 -0
- offload/_root/data/findings/oop/cce-copy-alloc-component-section-fault.f90 +73 -0
- offload/_root/data/findings/oop/cce-copy-parent-to-component-tofrom-lost.f90 +65 -0
- offload/_root/data/findings/oop/cce-copy-second-member-section-lost.f90 +65 -0
- offload/_root/data/findings/oop/cce-element-component-map-lost.f90 +64 -0
- offload/_root/data/findings/oop/cce-final-dealloc-device-abort.f90 +85 -0
- offload/_root/data/findings/oop/cce-pdt-default-mapper-rejected.f90 +71 -0
- offload/_root/data/findings/oop/cce-polymorphic-dispatch-device-link.f90 +100 -0
- offload/_root/data/findings/oop/cce-section-of-element-component-overlap.f90 +76 -0
- offload/_root/data/findings/oop/cce-select-type-guard-not-taken.f90 +91 -0
- offload/_root/data/findings/oop/cce-udr-derived-type-unsupported.f90 +69 -0
- offload/_root/data/findings/oop/cce21-element-component-map-lost.f90 +62 -0
- offload/_root/data/findings/oop/controls/alloccomp-comp-only.f90 +44 -0
- offload/_root/data/findings/oop/controls/alloccomp-whole-explicit-component.f90 +50 -0
- offload/_root/data/findings/oop/controls/alloccomp-whole.f90 +49 -0
- offload/_root/data/findings/oop/controls/elemsec-element.f90 +47 -0
- offload/_root/data/findings/oop/controls/final-local.f90 +64 -0
- offload/_root/data/findings/oop/controls/host-class-star-select-type.f90 +58 -0
- offload/_root/data/findings/oop/controls/host-firstprivate-defined-assignment.f90 +54 -0
- offload/_root/data/findings/oop/controls/host-lastprivate-defined-assignment.f90 +58 -0
- offload/_root/data/findings/oop/controls/host-private-finalization.f90 +51 -0
- offload/_root/data/findings/oop/controls/host-select-type.f90 +65 -0
- offload/_root/data/findings/oop/controls/parent-and-comp-component-only.f90 +45 -0
- offload/_root/data/findings/oop/controls/pdt-kind.f90 +46 -0
- offload/_root/data/findings/oop/controls/pdt-len-host.f90 +43 -0
- offload/_root/data/findings/oop/controls/pdt-len-unparameterized.f90 +46 -0
- offload/_root/data/findings/oop/controls/poly-dispatch-static.f90 +75 -0
- offload/_root/data/findings/oop/controls/section-alloc-whole-component.f90 +49 -0
- offload/_root/data/findings/oop/controls/section-element-whole-array.f90 +50 -0
- offload/_root/data/findings/oop/controls/section-element-whole-component.f90 +50 -0
- offload/_root/data/findings/oop/controls/section-fixed.f90 +43 -0
- offload/_root/data/findings/oop/controls/tbp-override.f90 +64 -0
- offload/_root/data/findings/oop/gcc-acc-parent-and-member-data-rejected.f90 +63 -0
- offload/_root/data/findings/oop/gcc-pdt-length-parameter-abort.f90 +68 -0
- offload/_root/data/findings/oop/gcc-polymorphic-dispatch-abort.f90 +97 -0
- offload/_root/data/findings/oop/gcc-vtab-not-marked-for-offload.f90 +94 -0
- offload/_root/data/findings/oop/nvhpc-copy-alloc-component-illegal-address.f90 +76 -0
- offload/_root/data/findings/oop/nvhpc-copy-pdt-length-parameter-illegal-address.f90 +69 -0
- offload/_root/data/findings/oop/nvhpc-named-mapper-rejected.f90 +65 -0
- offload/_root/data/findings/oop/nvhpc-polymorphic-dispatch-translate-failure.f90 +90 -0
- offload/_root/data/findings/oop/nvhpc-polymorphism-runtime-unsupported.f90 +94 -0
- offload/_root/data/findings/oop/nvhpc-type-bound-call-rejected.f90 +89 -0
- offload/_root/data/findings/oop/nvhpc-udr-derived-type-rejected.f90 +67 -0
- offload/_root/data/findings/reviews/afar-c-error-directive-in-target-link.json +217 -0
- offload/_root/data/findings/reviews/afar-c-lastprivate-distribute-parallel-for-small-type.json +113 -0
- offload/_root/data/findings/reviews/afar-c-teams-distribute-reduction-first-team.json +130 -0
- offload/_root/data/findings/reviews/afar-c-update-iterator-copy-mode.json +113 -0
- offload/_root/data/findings/reviews/afar-cce19-character-defaultmap.json +292 -0
- offload/_root/data/findings/reviews/afar-clang-requires-device-safesync-hang.json +191 -0
- offload/_root/data/findings/reviews/afar-flang-firstprivate-map-two-targets.json +130 -0
- offload/_root/data/findings/reviews/afar-flang-loop-bind-teams-reduction.json +126 -0
- offload/_root/data/findings/reviews/afar-flang-task-reduction-max.json +113 -0
- offload/_root/data/findings/reviews/afar-flang-thread-limit-target-parallel-do.json +113 -0
- offload/_root/data/findings/reviews/afar-loop-bind-thread-in-teams.json +191 -0
- offload/_root/data/findings/reviews/afar-nontemporal-assumed-shape-ice.json +113 -0
- offload/_root/data/findings/reviews/afar-udr-derived-type-link.json +113 -0
- offload/_root/data/findings/reviews/afar-xnack1-atomic-min-nested-parallel.json +113 -0
- offload/_root/data/findings/reviews/afar-xnack1-target-is-present.json +113 -0
- offload/_root/data/findings/reviews/apps--afar-cce-teams-private-array-nested-parallel-wrong.json +113 -0
- offload/_root/data/findings/reviews/apps--cce20-device-link-infer-address-spaces-crash.json +113 -0
- offload/_root/data/findings/reviews/apps--cce21-device-link-agpr-copy-mfma-assert.json +113 -0
- offload/_root/data/findings/reviews/apps--cce21-private-array-loaded-subscript-wrong.json +113 -0
- offload/_root/data/findings/reviews/apps--gcc-acc-c-tile-partial-tiles-wrong.json +113 -0
- offload/_root/data/findings/reviews/catalog--afar-c-ordered-doacross-link.json +113 -0
- offload/_root/data/findings/reviews/catalog--afar-c-reduction-task-link.json +113 -0
- offload/_root/data/findings/reviews/catalog--afar-flang-absent-optional-target-crash.json +113 -0
- offload/_root/data/findings/reviews/catalog--afar-flang-critical-target-parallel-wrong.json +113 -0
- offload/_root/data/findings/reviews/catalog--afar-flang-dist-schedule-chunk.json +113 -0
- offload/_root/data/findings/reviews/catalog--afar-flang-linear-parallel-ice.json +113 -0
- offload/_root/data/findings/reviews/catalog--afar-flang-named-critical-link.json +126 -0
- offload/_root/data/findings/reviews/catalog--afar-flang-ordered-wrong.json +113 -0
- offload/_root/data/findings/reviews/catalog--afar-flang-reduction-minus-rejected.json +113 -0
- offload/_root/data/findings/reviews/catalog--afar-flang-sections-in-target-ice.json +113 -0
- offload/_root/data/findings/reviews/catalog--afar-flang-workdistribute-ice.json +113 -0
- offload/_root/data/findings/reviews/catalog--c-allocate-const-mem-firstprivate-wrong.json +113 -0
- offload/_root/data/findings/reviews/catalog--cce-acc-character-dummy-routine-ice.json +113 -0
- offload/_root/data/findings/reviews/catalog--cce-acc-loop-seq-in-routine-wrong.json +113 -0
- offload/_root/data/findings/reviews/catalog--cce-allocators-stack-ice.json +113 -0
- offload/_root/data/findings/reviews/catalog--cce-c-allocate-align-link.json +113 -0
- offload/_root/data/findings/reviews/catalog--cce-c-allocate-allocator-modifier-rejected.json +113 -0
- offload/_root/data/findings/reviews/catalog--cce-c-dist-schedule-chunk.json +113 -0
- offload/_root/data/findings/reviews/catalog--cce-c-f-pointer-device-link.json +130 -0
- offload/_root/data/findings/reviews/catalog--cce-c-long-double-ice.json +217 -0
- offload/_root/data/findings/reviews/catalog--cce-c-map-iterator-ice.json +217 -0
- offload/_root/data/findings/reviews/catalog--cce-c-recursive-function-ice.json +113 -0
- offload/_root/data/findings/reviews/catalog--cce-c-sections-in-target-wrong.json +113 -0
- offload/_root/data/findings/reviews/catalog--cce-flang-allocate-in-target-crash.json +113 -0
- offload/_root/data/findings/reviews/catalog--cce-flang-lastprivate-parallel-in-seq-loop-wrong.json +113 -0
- offload/_root/data/findings/reviews/catalog--cce-flang-stop-in-target-crash.json +113 -0
- offload/_root/data/findings/reviews/catalog--cce-iterator-link.json +113 -0
- offload/_root/data/findings/reviews/catalog--cce-linear-lastprivate-ice.json +113 -0
- offload/_root/data/findings/reviews/catalog--cce-reduction-inscan-ice.json +113 -0
- offload/_root/data/findings/reviews/catalog--cce-reduction-task-link.json +113 -0
- offload/_root/data/findings/reviews/catalog--cce19-reduction-task-addrspacecast-ice.json +113 -0
- offload/_root/data/findings/reviews/catalog--cce20-c-defaultmap-private-storage-rejected.json +217 -0
- offload/_root/data/findings/reviews/catalog--cce20-map-self-rejected.json +204 -0
- offload/_root/data/findings/reviews/catalog--cce21-c-target-loop-ice.json +126 -0
- offload/_root/data/findings/reviews/catalog--defaultmap-present-private-array-abort.json +236 -0
- offload/_root/data/findings/reviews/catalog--nvhpc-acc-associate-illegal-address.json +113 -0
- offload/_root/data/findings/reviews/catalog--nvhpc-c-function-pointer-kernel-missing.json +268 -0
- offload/_root/data/findings/reviews/cce-acc-init-set-runtime-assert.json +113 -0
- offload/_root/data/findings/reviews/cce-acc-reduction-200-int8-scalars-wrong.json +113 -0
- offload/_root/data/findings/reviews/cce-acc-routine-bind-module-ice.json +113 -0
- offload/_root/data/findings/reviews/cce-c-dist-schedule-segv.json +113 -0
- offload/_root/data/findings/reviews/cce-c-map-delete-refcount.json +149 -0
- offload/_root/data/findings/reviews/cce-c-map-present-assert.json +126 -0
- offload/_root/data/findings/reviews/cce-c-openmp45-device-link.json +113 -0
- offload/_root/data/findings/reviews/cce-c-parallel-for-in-target.json +141 -0
- offload/_root/data/findings/reviews/cce-mapper-next-map-copy-back.json +208 -0
- offload/_root/data/findings/reviews/cce-uses-allocators-traits-omp50.json +191 -0
- offload/_root/data/findings/reviews/cce19-c-reduction-63-scalars-one-wrong.json +113 -0
- offload/_root/data/findings/reviews/cce19-target-parallel-guarded-loop.json +113 -0
- offload/_root/data/findings/reviews/cce19-target-parallel-single-ice.json +113 -0
- offload/_root/data/findings/reviews/cce21-alloc-2e32-sum-wrong.json +113 -0
- offload/_root/data/findings/reviews/cce21-defaultmap-aggregate-flag.json +210 -0
- offload/_root/data/findings/reviews/cce21-in-reduction-assumed-shape-write-lost.json +113 -0
- offload/_root/data/findings/reviews/cce21-in-reduction-taskwait-link.json +113 -0
- offload/_root/data/findings/reviews/clang-c-declare-target-to-omp52.json +113 -0
- offload/_root/data/findings/reviews/clang-c-linear-directive-name-hang.json +113 -0
- offload/_root/data/findings/reviews/clang-c-shared-declare-target-combined.json +132 -0
- offload/_root/data/findings/reviews/dataenv--cce-value-dummy-target-write-visible.json +113 -0
- offload/_root/data/findings/reviews/defaultmap-none-loop-variable.json +113 -0
- offload/_root/data/findings/reviews/fortran-schedule-static-in-target.json +113 -0
- offload/_root/data/findings/reviews/fresh--cce-common-block-name-in-map-rejected.json +113 -0
- offload/_root/data/findings/reviews/fresh--cce-list-directed-print-in-target-copy-crash.json +217 -0
- offload/_root/data/findings/reviews/fresh--cce19-acc-automatic-array-copyout-copy-crash.json +113 -0
- offload/_root/data/findings/reviews/fresh--cce21-combined-if-runtime-expr-loop-skipped.json +113 -0
- offload/_root/data/findings/reviews/fresh--nvhpc-acc-gang-worker-collapse-nested-vector-reduction-lost.json +113 -0
- offload/_root/data/findings/reviews/fresh--nvhpc-teams-loop-module-allocatable-assign-fort2-crash.json +113 -0
- offload/_root/data/findings/reviews/fuzz--1505-cce20.json +113 -0
- offload/_root/data/findings/reviews/fuzz--1540-afar.json +113 -0
- offload/_root/data/findings/reviews/fuzz--1978-cce19.json +130 -0
- offload/_root/data/findings/reviews/fuzz--2334-cce19.json +113 -0
- offload/_root/data/findings/reviews/fuzz--591-cce19.json +147 -0
- offload/_root/data/findings/reviews/fuzz--650-afar.json +113 -0
- offload/_root/data/findings/reviews/fuzz--916-afar.json +130 -0
- offload/_root/data/findings/reviews/fuzz--98-cce19.json +113 -0
- offload/_root/data/findings/reviews/fuzz--b1-121-afar.json +160 -0
- offload/_root/data/findings/reviews/fuzz--b2-209-cce19.json +141 -0
- offload/_root/data/findings/reviews/fuzz--b2-68-afar.json +113 -0
- offload/_root/data/findings/reviews/fuzz--b2-85-cce20.json +217 -0
- offload/_root/data/findings/reviews/fuzz--b3-188-cce19.json +113 -0
- offload/_root/data/findings/reviews/fuzz--b3-278-cce19.json +212 -0
- offload/_root/data/findings/reviews/fuzz--b3-54-afar.json +113 -0
- offload/_root/data/findings/reviews/fuzz--b3-61-cce20.json +191 -0
- offload/_root/data/findings/reviews/fuzz--b4-86-cce19.json +113 -0
- offload/_root/data/findings/reviews/fuzz--gcc-declare-reduction-module-not-found.json +113 -0
- offload/_root/data/findings/reviews/fuzz--gcc-target-simd-map-nontemporal-rejected.json +113 -0
- offload/_root/data/findings/reviews/fuzz--nvhpc-allocatable-component-implicit-map-illegal-address.json +141 -0
- offload/_root/data/findings/reviews/fuzz--nvhpc-assumed-length-character-dummy-map-ice.json +113 -0
- offload/_root/data/findings/reviews/fuzz--nvhpc-default-none-reduction-lastprivate-fort1-crash.json +113 -0
- offload/_root/data/findings/reviews/fuzz--nvhpc-defaultmap-firstprivate-lastprivate-ice.json +113 -0
- offload/_root/data/findings/reviews/fuzz--nvhpc-defaultmap-to-scalar-reduction-lost.json +113 -0
- offload/_root/data/findings/reviews/fuzz--nvhpc-depend-implicit-map-illegal-address.json +113 -0
- offload/_root/data/findings/reviews/fuzz--nvhpc-distribute-parallel-num-threads-writes-lost.json +113 -0
- offload/_root/data/findings/reviews/fuzz--nvhpc-end-distribute-simd-rejected.json +113 -0
- offload/_root/data/findings/reviews/fuzz--nvhpc-loop-character-achar-unsupported.json +113 -0
- offload/_root/data/findings/reviews/fuzz--nvhpc-map-always-after-map-to-not-copied-back.json +113 -0
- offload/_root/data/findings/reviews/fuzz--nvhpc-num-threads-reduction-identity-lost.json +113 -0
- offload/_root/data/findings/reviews/fuzz--nvhpc-target-parallel-firstprivate-translate-failure.json +191 -0
- offload/_root/data/findings/reviews/fuzz--nvhpc-target-parallel-single-hang.json +113 -0
- offload/_root/data/findings/reviews/fuzz--nvhpc-target-simd-collapse-translate-failure.json +113 -0
- offload/_root/data/findings/reviews/fuzz--nvhpc-target-simd-no-end-directive-rejected.json +113 -0
- offload/_root/data/findings/reviews/fuzz--par-s1-2082-gcc_g90.json +126 -0
- offload/_root/data/findings/reviews/fuzz--s1-2370-cce21.json +113 -0
- offload/_root/data/findings/reviews/fuzz--s1-2592-cce21.json +113 -0
- offload/_root/data/findings/reviews/fuzz--s1-3463-cce21.json +113 -0
- offload/_root/data/findings/reviews/fuzz--s1-6760-cce20.json +130 -0
- offload/_root/data/findings/reviews/fuzz--s1-6888-cce21.json +113 -0
- offload/_root/data/findings/reviews/fuzz--s1-7882-cce20.json +113 -0
- offload/_root/data/findings/reviews/fuzz--s1-8634-cce21.json +113 -0
- offload/_root/data/findings/reviews/fuzz--s1-91-cce21.json +113 -0
- offload/_root/data/findings/reviews/fuzz--s1-9443-afar.json +113 -0
- offload/_root/data/findings/reviews/fuzz--s1-9914-cce19.json +141 -0
- offload/_root/data/findings/reviews/gcc--gcc-acc-bind-device-type-rejected.json +113 -0
- offload/_root/data/findings/reviews/gcc--gcc-acc-detach-delete-attach-underflow.json +314 -0
- offload/_root/data/findings/reviews/gcc--gcc-acc-gang-dim-collapse-force-rejected.json +113 -0
- offload/_root/data/findings/reviews/gcc--gcc-acc-init-set-shutdown-rejected.json +113 -0
- offload/_root/data/findings/reviews/gcc--gcc-acc-link-in-routine-rejected.json +113 -0
- offload/_root/data/findings/reviews/gcc--gcc-acc-use-device-allocatable-rejected.json +113 -0
- offload/_root/data/findings/reviews/gcc--gcc-c-motion-mapper-rejected.json +113 -0
- offload/_root/data/findings/reviews/gcc--gcc-c-omp60-undocumented-rejected.json +217 -0
- offload/_root/data/findings/reviews/gcc--gcc-c-omp60-unimplemented-rejected.json +236 -0
- offload/_root/data/findings/reviews/gcc--gcc-c-target-in-task-mandatory-device-not-found.json +236 -0
- offload/_root/data/findings/reviews/gcc--gcc-c-uses-allocators-traits-unimplemented.json +113 -0
- offload/_root/data/findings/reviews/gcc--gcc-declare-mapper-rejected.json +113 -0
- offload/_root/data/findings/reviews/gcc--gcc-defaultmap-to-pointer-copy-back.json +217 -0
- offload/_root/data/findings/reviews/gcc--gcc-loop-bind-default-none-rejected.json +113 -0
- offload/_root/data/findings/reviews/harvest--afar-flang-strided-target-update.json +141 -0
- offload/_root/data/findings/reviews/harvest--cce-acc-declare-create-module-allocatable-xnack1-fault.json +113 -0
- offload/_root/data/findings/reviews/harvest--cce-c-implicit-struct-map-partly-present.json +217 -0
- offload/_root/data/findings/reviews/harvest--cce-c-strided-target-update.json +141 -0
- offload/_root/data/findings/reviews/harvest--cce-ftn-target-parallel-thread-query-ice.json +130 -0
- offload/_root/data/findings/reviews/harvest--cce-named-constant-array-declare-target-routine-rejected.json +113 -0
- offload/_root/data/findings/reviews/harvest--cce-use-device-ptr-c-ptr-not-converted.json +113 -0
- offload/_root/data/findings/reviews/harvest--cce21-declare-target-link-module-variable-write-lost.json +113 -0
- offload/_root/data/findings/reviews/harvest--cce21-internal-procedure-calls-internal-in-target-fault.json +158 -0
- offload/_root/data/findings/reviews/harvest--gcc-acc-declare-create-allocatable-not-mapped.json +204 -0
- offload/_root/data/findings/reviews/harvest--gcc-c-same-item-two-maps-rejected.json +143 -0
- offload/_root/data/findings/reviews/harvest--gcc-c-strided-section-rejected.json +164 -0
- offload/_root/data/findings/reviews/harvest--gcc-c-target-data-struct-pointer-section-ice.json +113 -0
- offload/_root/data/findings/reviews/harvest--gcc-c-target-data-two-maps-ice.json +113 -0
- offload/_root/data/findings/reviews/harvest--gcc-teams-simd-matmul-allocatable-ice.json +113 -0
- offload/_root/data/findings/reviews/harvest--nvhpc-c-target-data-if-false-use-device-ptr-garbage.json +113 -0
- offload/_root/data/findings/reviews/harvest--nvhpc-named-constant-array-declare-target-routine-rejected.json +126 -0
- offload/_root/data/findings/reviews/harvest--nvhpc-use-device-ptr-c-ptr-not-found.json +113 -0
- offload/_root/data/findings/reviews/harvest--nvhpc2511-target-nowait-in-parallel-for-ice.json +130 -0
- offload/_root/data/findings/reviews/hecbench--gcc-c-float16-array-in-target-lto-ice.json +217 -0
- offload/_root/data/findings/reviews/hecbench--gcc-c-swar-popcount-assembler-error.json +126 -0
- offload/_root/data/findings/reviews/malloc--afar-device-malloc-in-kernel-corrupts-records.json +270 -0
- offload/_root/data/findings/reviews/multithread-allocatable-section-maps.json +191 -0
- offload/_root/data/findings/reviews/nested--afar-cce-c-call-result-member-in-target-rejected.json +113 -0
- offload/_root/data/findings/reviews/nested--afar-cce-c-update-struct-and-member-rejected.json +126 -0
- offload/_root/data/findings/reviews/nested--afar-flang-pointer-root-allocatable-component-enter-data-fault.json +191 -0
- offload/_root/data/findings/reviews/nested--cce-c-struct-and-nested-pointee-sections-ice.json +113 -0
- offload/_root/data/findings/reviews/nested--cce-fortran-nested-allocatable-component-copy-fault.json +214 -0
- offload/_root/data/findings/reviews/nested--cce-fortran-pointer-to-type-with-allocatable-scalar-component-typed-transfer.json +191 -0
- offload/_root/data/findings/reviews/nested--cce-fortran-update-to-pointer-root-allocatable-scalar-component-no-accelerator-object.json +297 -0
- offload/_root/data/findings/reviews/nested--gcc-acc-c-exit-data-of-a-pointer-array-element-target-hangs.json +204 -0
- offload/_root/data/findings/reviews/nested--gcc-acc-c-parent-and-shared-pointee-one-directive.json +130 -0
- offload/_root/data/findings/reviews/nested--gcc-acc-c-struct-and-member-array-one-directive.json +141 -0
- offload/_root/data/findings/reviews/nested--gcc-c-always-on-pointer-member-section-ice.json +113 -0
- offload/_root/data/findings/reviews/nested--gcc-c-declare-mapper-pointer-member-section-gpu-fault.json +113 -0
- offload/_root/data/findings/reviews/nested--gcc-c-from-struct-and-pointee-section-rejected.json +113 -0
- offload/_root/data/findings/reviews/nested--gcc-fortran-pointer-component-alloc-bounds-lost.json +217 -0
- offload/_root/data/findings/reviews/nested--gcc-fortran-root-and-element-pointer-components-ice.json +217 -0
- offload/_root/data/findings/reviews/nested--nvhpc-c-pointee-before-parent-in-one-map-list-copy-fault.json +204 -0
- offload/_root/data/findings/reviews/nested--nvhpc-c-update-from-structure-overwrites-attached-pointer-segv.json +191 -0
- offload/_root/data/findings/reviews/nvhpc-c-acc-atomic-update-sum-ice.json +277 -0
- offload/_root/data/findings/reviews/nvhpc-c-dist-schedule-chunk-compile-hang.json +113 -0
- offload/_root/data/findings/reviews/nvhpc-c-map-present-ignored.json +113 -0
- offload/_root/data/findings/reviews/nvhpc-c-ordered-in-target-nvcpfe-crash.json +113 -0
- offload/_root/data/findings/reviews/nvhpc-c-parallel-for-firstprivate-in-target.json +113 -0
- offload/_root/data/findings/reviews/nvhpc-defaultmap-firstprivate-explicit-map.json +113 -0
- offload/_root/data/findings/reviews/nvhpc-defaultmap-from-allocatable-indexing.json +132 -0
- offload/_root/data/findings/reviews/nvhpc-depend-inoutset-ignored.json +113 -0
- offload/_root/data/findings/reviews/nvhpc-dist-schedule-chunk-illegal-address.json +113 -0
- offload/_root/data/findings/reviews/nvhpc-managed-acc-shutdown-host-access.json +113 -0
- offload/_root/data/findings/reviews/nvhpc-parallel-if-in-target-nvvm-ice.json +113 -0
- offload/_root/data/findings/reviews/oop--afar-final-dealloc-device-link.json +132 -0
- offload/_root/data/findings/reviews/oop--afar-pdt-length-parameter-not-implemented.json +113 -0
- offload/_root/data/findings/reviews/oop--cce-class-is-device-link.json +130 -0
- offload/_root/data/findings/reviews/oop--cce-copy-alloc-component-section-fault.json +217 -0
- offload/_root/data/findings/reviews/oop--cce-copy-parent-to-component-tofrom-lost.json +217 -0
- offload/_root/data/findings/reviews/oop--cce-copy-second-member-section-lost.json +113 -0
- offload/_root/data/findings/reviews/oop--cce-element-component-map-lost.json +113 -0
- offload/_root/data/findings/reviews/oop--cce-final-dealloc-device-abort.json +208 -0
- offload/_root/data/findings/reviews/oop--cce-pdt-default-mapper-rejected.json +191 -0
- offload/_root/data/findings/reviews/oop--cce-polymorphic-dispatch-device-link.json +247 -0
- offload/_root/data/findings/reviews/oop--cce-section-of-element-component-overlap.json +113 -0
- offload/_root/data/findings/reviews/oop--cce-select-type-guard-not-taken.json +191 -0
- offload/_root/data/findings/reviews/oop--cce-udr-derived-type-unsupported.json +132 -0
- offload/_root/data/findings/reviews/oop--gcc-acc-parent-and-member-data-rejected.json +141 -0
- offload/_root/data/findings/reviews/oop--gcc-pdt-length-parameter-abort.json +141 -0
- offload/_root/data/findings/reviews/oop--gcc-polymorphic-dispatch-abort.json +217 -0
- offload/_root/data/findings/reviews/oop--gcc-vtab-not-marked-for-offload.json +113 -0
- offload/_root/data/findings/reviews/oop--nvhpc-copy-alloc-component-illegal-address.json +113 -0
- offload/_root/data/findings/reviews/oop--nvhpc-copy-pdt-length-parameter-illegal-address.json +236 -0
- offload/_root/data/findings/reviews/oop--nvhpc-named-mapper-rejected.json +113 -0
- offload/_root/data/findings/reviews/oop--nvhpc-polymorphic-dispatch-translate-failure.json +223 -0
- offload/_root/data/findings/reviews/oop--nvhpc-polymorphism-runtime-unsupported.json +126 -0
- offload/_root/data/findings/reviews/oop--nvhpc-type-bound-call-rejected.json +113 -0
- offload/_root/data/findings/reviews/oop--nvhpc-udr-derived-type-rejected.json +113 -0
- offload/_root/data/findings/reviews/stress--afar-c-lastprivate-combined-target-not-mapped.json +113 -0
- offload/_root/data/findings/reviews/stress--afar-target-scalar-implicit-firstprivate.json +175 -0
- offload/_root/data/findings/reviews/stress--cce-acc-declare-create-scalar-serial-firstprivate.json +113 -0
- offload/_root/data/findings/reviews/stress--cce-c-distribute-lastprivate-lost.json +113 -0
- offload/_root/data/findings/reviews/stress--cce-c-flto-offload-dropped.json +204 -0
- offload/_root/data/findings/reviews/stress--cce-ftn-cif-record-split-abort.json +113 -0
- offload/_root/data/findings/reviews/stress--cce-lastprivate-num-threads-collapse-simd.json +113 -0
- offload/_root/data/findings/reviews/stress--cce-teams-reduction-many-teams-wrap.json +113 -0
- offload/_root/data/findings/reviews/stress--cce21-declare-target-scalar-map-write-lost.json +113 -0
- offload/_root/data/findings/reviews/stress--gcc-declare-target-allocatable-component-ice.json +191 -0
- offload/_root/data/findings/reviews/stress--nvhpc-acc-derived-type-component-not-copied.json +126 -0
- offload/_root/data/findings/reviews/stress--nvhpc-c-lastprivate-teams-distribute-parallel-for-lost.json +113 -0
- offload/_root/data/findings/reviews/stress--nvhpc-declare-target-scalar-write-lost.json +113 -0
- offload/_root/data/findings/reviews/stress--nvhpc-lastprivate-combined-target-not-mapped.json +113 -0
- offload/_root/data/findings/reviews/stress--nvhpc-target-scalar-implicit-firstprivate.json +130 -0
- offload/_root/data/findings/reviews/target-update-sections-in-parallel.json +113 -0
- offload/_root/data/findings/stress/afar-c-lastprivate-combined-target-not-mapped.c +72 -0
- offload/_root/data/findings/stress/afar-target-scalar-implicit-firstprivate.f90 +47 -0
- offload/_root/data/findings/stress/cce-acc-declare-create-scalar-serial-firstprivate.f90 +43 -0
- offload/_root/data/findings/stress/cce-c-distribute-lastprivate-lost.c +52 -0
- offload/_root/data/findings/stress/cce-c-flto-offload-dropped.c +73 -0
- offload/_root/data/findings/stress/cce-ftn-cif-record-split-abort.f90 +109 -0
- offload/_root/data/findings/stress/cce-lastprivate-num-threads-collapse-simd.f90 +66 -0
- offload/_root/data/findings/stress/cce-teams-reduction-many-teams-wrap.f90 +55 -0
- offload/_root/data/findings/stress/cce21-declare-target-scalar-map-write-lost.f90 +58 -0
- offload/_root/data/findings/stress/controls/gcc-declare-target-allocatable-component-control.f90 +29 -0
- offload/_root/data/findings/stress/gcc-declare-target-allocatable-component-ice.f90 +61 -0
- offload/_root/data/findings/stress/nvhpc-acc-derived-type-component-not-copied.f90 +33 -0
- offload/_root/data/findings/stress/nvhpc-c-lastprivate-teams-distribute-parallel-for-lost.c +62 -0
- offload/_root/data/findings/stress/nvhpc-declare-target-scalar-write-lost.f90 +43 -0
- offload/_root/data/findings/stress/nvhpc-lastprivate-combined-target-not-mapped.f90 +60 -0
- offload/_root/data/findings/stress/nvhpc-target-scalar-implicit-firstprivate.f90 +41 -0
- offload/_root/data/findings/target-update-sections-in-parallel.f90 +53 -0
- offload/_root/data/issues.json +1 -0
- offload/_root/data/search.json +1 -0
- offload/_root/data/vendor/checks/build.py +288 -0
- offload/_version.py +24 -0
- offload/canuse.py +88 -0
- offload/cli.py +52 -0
- offload/data.py +85 -0
- offload/engine/__init__.py +0 -0
- offload/engine/acc_c_gen.py +415 -0
- offload/engine/acc_gen.py +1104 -0
- offload/engine/acc_rules.py +656 -0
- offload/engine/apps.py +804 -0
- offload/engine/baseline.py +324 -0
- offload/engine/c_gen.py +883 -0
- offload/engine/c_program.py +913 -0
- offload/engine/c_rules.py +503 -0
- offload/engine/campaign.py +1180 -0
- offload/engine/campaigns/__init__.py +2 -0
- offload/engine/campaigns/hecbench.py +153 -0
- offload/engine/campaigns/nested.py +76 -0
- offload/engine/campaigns/oop.py +61 -0
- offload/engine/canary.py +275 -0
- offload/engine/catalog.py +860 -0
- offload/engine/citations.py +532 -0
- offload/engine/clang_oracle.py +208 -0
- offload/engine/combos.py +234 -0
- offload/engine/confirm/__init__.py +2 -0
- offload/engine/confirm/backlog.py +159 -0
- offload/engine/confirm/claims.py +423 -0
- offload/engine/confirm/collectors.py +665 -0
- offload/engine/confirm/decisions.py +202 -0
- offload/engine/confirm/draft.py +195 -0
- offload/engine/confirm/engine.py +157 -0
- offload/engine/confirm/execute.py +382 -0
- offload/engine/confirm/facts.py +467 -0
- offload/engine/confirm/findings.py +617 -0
- offload/engine/confirm/forms.py +145 -0
- offload/engine/confirm/ingest.py +372 -0
- offload/engine/confirm/jobs.py +215 -0
- offload/engine/confirm/legality.py +323 -0
- offload/engine/confirm/machines.py +254 -0
- offload/engine/confirm/minimize.py +268 -0
- offload/engine/confirm/model.py +249 -0
- offload/engine/confirm/ports.py +107 -0
- offload/engine/confirm/programs.py +222 -0
- offload/engine/confirm/registry.py +151 -0
- offload/engine/confirm/regress.py +278 -0
- offload/engine/confirm/rules.py +565 -0
- offload/engine/confirm/store.py +63 -0
- offload/engine/confirm/triage.py +838 -0
- offload/engine/confirm/validate.py +607 -0
- offload/engine/confirm/witness.py +355 -0
- offload/engine/corpus_check.py +388 -0
- offload/engine/coverage.py +318 -0
- offload/engine/dataenv_gen.py +1318 -0
- offload/engine/dataenv_rules.py +278 -0
- offload/engine/devtemps.py +146 -0
- offload/engine/expected.py +2559 -0
- offload/engine/f2c.py +1783 -0
- offload/engine/finding_claims.py +330 -0
- offload/engine/finding_header.py +229 -0
- offload/engine/finding_rows.py +382 -0
- offload/engine/flang_oracle.py +299 -0
- offload/engine/fsource.py +620 -0
- offload/engine/fuzz.py +2455 -0
- offload/engine/fuzz_base.py +2016 -0
- offload/engine/fuzz_campaign.py +592 -0
- offload/engine/fuzz_exec.py +798 -0
- offload/engine/fuzz_min.py +1049 -0
- offload/engine/fuzz_profile.py +340 -0
- offload/engine/fuzz_report.py +1270 -0
- offload/engine/fuzz_steer.py +181 -0
- offload/engine/gate.py +1013 -0
- offload/engine/gate_report.py +711 -0
- offload/engine/gate_run.py +118 -0
- offload/engine/gate_stored.py +466 -0
- offload/engine/gen.py +1114 -0
- offload/engine/gen_templates.py +2583 -0
- offload/engine/grammar.py +695 -0
- offload/engine/harness.py +1472 -0
- offload/engine/harvest/__init__.py +3 -0
- offload/engine/harvest/c_runtime.py +465 -0
- offload/engine/harvest/checks.py +534 -0
- offload/engine/harvest/convert.py +784 -0
- offload/engine/harvest/f_runtime.py +668 -0
- offload/engine/harvest/filters.py +338 -0
- offload/engine/harvest/history.py +122 -0
- offload/engine/harvest/inventory.py +399 -0
- offload/engine/harvest2/__init__.py +5 -0
- offload/engine/harvest2/aomp.py +119 -0
- offload/engine/harvest2/examples.py +116 -0
- offload/engine/harvest2/gomp.py +679 -0
- offload/engine/harvest2/hand.py +150 -0
- offload/engine/harvest2/split.py +78 -0
- offload/engine/harvest_known/__init__.py +2 -0
- offload/engine/harvest_known/apps.py +65 -0
- offload/engine/harvest_known/cases.py +128 -0
- offload/engine/harvest_known/centres.py +184 -0
- offload/engine/harvest_known/forum.py +180 -0
- offload/engine/harvest_known/relnotes.py +42 -0
- offload/engine/harvest_known/textscan.py +107 -0
- offload/engine/hdrwrap.py +42 -0
- offload/engine/hecbench.py +568 -0
- offload/engine/hecbench_report.py +265 -0
- offload/engine/hecbench_run.py +483 -0
- offload/engine/idioms.py +1427 -0
- offload/engine/kbody_cites.py +81 -0
- offload/engine/kbody_emit.py +949 -0
- offload/engine/kbody_gen.py +795 -0
- offload/engine/legality_review.py +236 -0
- offload/engine/localcfg.py +58 -0
- offload/engine/malloc_dd.py +267 -0
- offload/engine/mutate.py +1933 -0
- offload/engine/nested_cites.py +196 -0
- offload/engine/nested_emit.py +789 -0
- offload/engine/nested_gen.py +1721 -0
- offload/engine/offload_scope.py +197 -0
- offload/engine/ompvv.py +624 -0
- offload/engine/oop_gen.py +2249 -0
- offload/engine/prerun.py +1435 -0
- offload/engine/program_source.py +739 -0
- offload/engine/provenance.py +103 -0
- offload/engine/reduce.py +2098 -0
- offload/engine/report.py +3374 -0
- offload/engine/root.py +33 -0
- offload/engine/rules.py +4256 -0
- offload/engine/run_matrix.py +325 -0
- offload/engine/site/__init__.py +1 -0
- offload/engine/site/columns.py +53 -0
- offload/engine/site/data.py +648 -0
- offload/engine/site/header.py +228 -0
- offload/engine/site/inputs.py +115 -0
- offload/engine/site/matrix.py +434 -0
- offload/engine/site/scrub.py +294 -0
- offload/engine/skeleton.py +121 -0
- offload/engine/spec_text.py +242 -0
- offload/engine/stress.py +4122 -0
- offload/engine/stress_c.py +1000 -0
- offload/engine/stress_exec.py +805 -0
- offload/engine/stress_min.py +248 -0
- offload/engine/stress_report.py +552 -0
- offload/engine/textclean.py +97 -0
- offload/engine/toolchains.py +1070 -0
- offload/engine/transforms.py +511 -0
- offload/engine/usage.py +1252 -0
- offload/engine/widen.py +673 -0
- offload/engine/widen_progs.py +2396 -0
- offload/issues.py +146 -0
- offtarget-0.1.0.dist-info/METADATA +86 -0
- offtarget-0.1.0.dist-info/RECORD +886 -0
- offtarget-0.1.0.dist-info/WHEEL +4 -0
- offtarget-0.1.0.dist-info/entry_points.txt +2 -0
- offtarget-0.1.0.dist-info/licenses/LICENSE +21 -0
- offtarget-0.1.0.dist-info/licenses/THIRD_PARTY_NOTICES.md +20 -0
|
@@ -0,0 +1,1472 @@
|
|
|
1
|
+
"""Build, run and classify one program on one toolchain and memory mode.
|
|
2
|
+
|
|
3
|
+
``run_program(prog, tc, xnack, opt)`` compiles ``prog`` with
|
|
4
|
+
``tc.compile_cmd``, runs it on the MI300A and returns a ``Result`` whose
|
|
5
|
+
``outcome`` is an ``Outcome``, with the evidence for the verdict.
|
|
6
|
+
Compile output is matched against ``PATTERNS`` (messages from real compiler
|
|
7
|
+
output): environment, ice, not_implemented, link_undefined, diagnostic.
|
|
8
|
+
Environment problems and unmatched failures are ``harness_error``, never a
|
|
9
|
+
rejection; ``ignored`` messages give ``accepted_ignored``.
|
|
10
|
+
Each run happens in its own temporary directory and process group. The
|
|
11
|
+
primary run sets ``OMP_TARGET_OFFLOAD=mandatory`` and prints one
|
|
12
|
+
``RESULT ran_on_host=<0|1> check=<pass|fail>`` line; a failed one gets a
|
|
13
|
+
second run without it. Runs repeat ``repeats`` times and disagreeing runs
|
|
14
|
+
give the worst outcome with ``flaky=True``. Negative and compile-output
|
|
15
|
+
probes use ``ERROR_TERMINATION`` and ``COMPILE_DIAGNOSTIC``. OpenACC runs once."""
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
|
|
18
|
+
import dataclasses
|
|
19
|
+
import json
|
|
20
|
+
import os
|
|
21
|
+
import re
|
|
22
|
+
import shlex
|
|
23
|
+
import shutil
|
|
24
|
+
import signal
|
|
25
|
+
import subprocess
|
|
26
|
+
import tempfile
|
|
27
|
+
from dataclasses import dataclass
|
|
28
|
+
from enum import StrEnum
|
|
29
|
+
from functools import lru_cache
|
|
30
|
+
from pathlib import Path
|
|
31
|
+
from typing import Iterable
|
|
32
|
+
|
|
33
|
+
from offload.engine.gen import Program
|
|
34
|
+
from offload.engine.toolchains import (Toolchain, compiler_version, detect_gpu,
|
|
35
|
+
device_of, family, install_roots,
|
|
36
|
+
loaded_rocm_version)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class Outcome(StrEnum):
|
|
40
|
+
rejected = "rejected"
|
|
41
|
+
accepted_ignored = "accepted_ignored"
|
|
42
|
+
fell_back_to_host = "fell_back_to_host"
|
|
43
|
+
wrong_answer = "wrong_answer"
|
|
44
|
+
correct_on_device = "correct_on_device"
|
|
45
|
+
unobservable = "unobservable"
|
|
46
|
+
harness_error = "harness_error"
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
# Most pessimistic first; used to report the worst of disagreeing repeats.
|
|
50
|
+
WORST_FIRST = (Outcome.harness_error, Outcome.wrong_answer,
|
|
51
|
+
Outcome.fell_back_to_host, Outcome.accepted_ignored,
|
|
52
|
+
Outcome.rejected, Outcome.unobservable,
|
|
53
|
+
Outcome.correct_on_device)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
@dataclass(frozen=True)
|
|
57
|
+
class Result:
|
|
58
|
+
program_id: str
|
|
59
|
+
primary_atom: str
|
|
60
|
+
atoms: tuple[str, ...]
|
|
61
|
+
toolchain: str
|
|
62
|
+
xnack: int
|
|
63
|
+
opt: str
|
|
64
|
+
outcome: Outcome
|
|
65
|
+
reason: str
|
|
66
|
+
flaky: bool
|
|
67
|
+
flags: str
|
|
68
|
+
rocm: str | None
|
|
69
|
+
stdout: str
|
|
70
|
+
stderr: str
|
|
71
|
+
needs: tuple[str, ...] = ()
|
|
72
|
+
evidence: str = "construct"
|
|
73
|
+
observable: bool = True
|
|
74
|
+
legal: bool = True
|
|
75
|
+
violates: str | None = None
|
|
76
|
+
version: int = 0
|
|
77
|
+
thp: str = "n/a"
|
|
78
|
+
device: str = ""
|
|
79
|
+
compiler: str = ""
|
|
80
|
+
model: str = "omp"
|
|
81
|
+
lang: str = "f90" # "c" for a C program
|
|
82
|
+
scope: str = "device" # "host+device" for a pattern program
|
|
83
|
+
# Where the row ran: the toolchain's machine and arch, and the
|
|
84
|
+
# node's GPU per rocminfo ("<gfx> <marketing name>"); "" in rows
|
|
85
|
+
# written before these fields existed (all of them Tuolumne, gfx942)
|
|
86
|
+
machine: str = ""
|
|
87
|
+
arch: str = ""
|
|
88
|
+
gpu: str = ""
|
|
89
|
+
# Provenance (offload.engine.provenance; "" in rows written
|
|
90
|
+
# before provenance was recorded): the build directory, the node, the compiler's
|
|
91
|
+
# version and modules, a hash of the run environment, the code's git
|
|
92
|
+
# revision, and the reproduction gate's status ("pending" for a
|
|
93
|
+
# failing row the gate has not judged, "n/a" for a passing row, else a
|
|
94
|
+
# offload.engine.gate verdict)
|
|
95
|
+
build_dir: str = ""
|
|
96
|
+
node: str = ""
|
|
97
|
+
toolchain_build: str = ""
|
|
98
|
+
env_hash: str = ""
|
|
99
|
+
git_rev: str = ""
|
|
100
|
+
gate: str = ""
|
|
101
|
+
# Every classified message of a failed compile, worst first
|
|
102
|
+
# (classify_all); the outcome and reason are the worst one's
|
|
103
|
+
messages: str = ""
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
# --- the message table ---------------------------------------------------------------
|
|
107
|
+
#
|
|
108
|
+
# Regular expressions (re.MULTILINE), per toolchain and category, each taken
|
|
109
|
+
# from real output captured on Tuolumne (tests/data/messages/<file>.txt says
|
|
110
|
+
# which program and command produced it). COMMON applies to every toolchain.
|
|
111
|
+
|
|
112
|
+
COMMON_ENVIRONMENT = (
|
|
113
|
+
# cce_run_no_rocm: CCE binary run without the module prelude
|
|
114
|
+
r"error while loading shared libraries: .*cannot open shared object file",
|
|
115
|
+
# shell_no_module: Lmod not initialised
|
|
116
|
+
r"module: command not found",
|
|
117
|
+
# shell_no_module: the compiler is not on PATH
|
|
118
|
+
r"^bash: .*: command not found",
|
|
119
|
+
# lmod_unknown_module
|
|
120
|
+
r"Lmod has detected the following error",
|
|
121
|
+
# shell_missing_compiler: compiler path does not exist
|
|
122
|
+
r"^bash: .*: No such file or directory",
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
PATTERNS: dict[str, dict[str, tuple[str, ...]]] = {
|
|
126
|
+
"afar": {
|
|
127
|
+
"environment": COMMON_ENVIRONMENT + (
|
|
128
|
+
r"unable to find library -l\S+", # afar_link_quadmath
|
|
129
|
+
# afar_frontend_killed: SIGKILL (OOM killer, external kill)
|
|
130
|
+
r"error: unable to execute command: Killed",
|
|
131
|
+
),
|
|
132
|
+
"ice": ( # afar_ice_segfault
|
|
133
|
+
r"PLEASE submit a bug report to https://github\.com/llvm/llvm-project",
|
|
134
|
+
r"error: unable to execute command: Segmentation fault",
|
|
135
|
+
# afar_ice_llvm_verifier: LLVM IR the compiler generated fails
|
|
136
|
+
# the verifier (reduction(task, ...) in a target region); NOT
|
|
137
|
+
# "failed to create the LLVM module", which also follows a
|
|
138
|
+
# not-yet-implemented or MLIR diagnostic
|
|
139
|
+
r"^Call parameter type does not match function signature!",
|
|
140
|
+
# afar_ice_fir_verification: the FIR the compiler lowered fails
|
|
141
|
+
# its own verifier (fuzz campaign)
|
|
142
|
+
r"^error: verification of lowering to FIR failed",
|
|
143
|
+
),
|
|
144
|
+
"not_implemented": (
|
|
145
|
+
r"not yet implemented", # afar_not_implemented
|
|
146
|
+
),
|
|
147
|
+
# afar_link_device_runtime: the device image of a
|
|
148
|
+
# program with module derived types references flang runtime
|
|
149
|
+
# routines the device runtime lacks; _undefined_symbols decides
|
|
150
|
+
# program vs system by the referrer (the program's .img.lto.o)
|
|
151
|
+
"link_undefined": (
|
|
152
|
+
r"lld: error: undefined symbol: ",
|
|
153
|
+
),
|
|
154
|
+
"error": (
|
|
155
|
+
r"^\S.*:\d+:\d+: error: ", # afar_syntax_error, ...
|
|
156
|
+
r"^error: Semantic errors in ", # afar_clause_not_allowed
|
|
157
|
+
r"^error: Could not parse ", # afar_syntax_error
|
|
158
|
+
r"^loc\(.*\): error: ", # afar_mlir_op_not_allowed
|
|
159
|
+
),
|
|
160
|
+
"ignored": (
|
|
161
|
+
r"is not supported and will be ignored", # afar_ignored_reverse_offload
|
|
162
|
+
),
|
|
163
|
+
},
|
|
164
|
+
"cce19": {
|
|
165
|
+
"environment": COMMON_ENVIRONMENT + (
|
|
166
|
+
r"lib\S+\.so[\d.]*, needed by \S+, not found", # cce_link_no_rocm
|
|
167
|
+
),
|
|
168
|
+
"ice": (
|
|
169
|
+
r"INTERNAL COMPILER ERROR", # cce_ice_ordered
|
|
170
|
+
r"^ftn-\d+ ftn: INTERNAL",
|
|
171
|
+
# cce_ice_addrspacecast: the LLVM back end rejects code the
|
|
172
|
+
# compiler generated ("in function <generated>: ...")
|
|
173
|
+
r"^error: \S+:\d+:\d+: in function \S+ .*: invalid addrspacecast",
|
|
174
|
+
),
|
|
175
|
+
"not_implemented": (
|
|
176
|
+
r"Implementation for the .* is deferred", # cce_deferred
|
|
177
|
+
r"Unsupported OpenMP construct", # cce_unsupported_construct
|
|
178
|
+
# Cce_acc_unsupported_construct
|
|
179
|
+
r"Unsupported OpenACC construct",
|
|
180
|
+
),
|
|
181
|
+
# detectors only: _undefined_symbols decides program vs system
|
|
182
|
+
"link_undefined": (
|
|
183
|
+
r"lld: error: undefined symbol: ", # cce_link_c_f_pointer
|
|
184
|
+
r"undefined reference to `", # cce_link_ompit
|
|
185
|
+
),
|
|
186
|
+
"error": (
|
|
187
|
+
r"^ftn-\d+ ftn: ERROR", # cce_syntax_error, ...
|
|
188
|
+
),
|
|
189
|
+
"ignored": (
|
|
190
|
+
r'OpenMP [\d.]+ "\w+" clause is being ignored', # cce_ignored_device
|
|
191
|
+
),
|
|
192
|
+
},
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
# C: AFAR amdclang and CCE craycc are both clang front ends and
|
|
196
|
+
# print clang's diagnostics (captured: afar_c_syntax_error,
|
|
197
|
+
# cce_c_syntax_error, afar_c_error_warning, cce_c_error_fatal, ...); the
|
|
198
|
+
# environment patterns are the toolchain's own. Keys "<family>:c". Unlike
|
|
199
|
+
# the Fortran compilers, clang drops an OpenMP clause, modifier or
|
|
200
|
+
# directive-name word it does not know with a warning and compiles the
|
|
201
|
+
# rest ("extra tokens at the end of '#pragma omp target' are ignored": a
|
|
202
|
+
# 6.0 replayable clause, the "loop" of 6.0 "target loop"), so that warning
|
|
203
|
+
# is "ignored" (captured: afar_c_extra_tokens_ignored,
|
|
204
|
+
# cce_c_extra_tokens_ignored, afar_c_modifier_ignored).
|
|
205
|
+
_CLANG_C = {
|
|
206
|
+
"error": (
|
|
207
|
+
r"^\S.*:\d+:\d+: (?:fatal )?error: ", # afar/cce_c_syntax_error
|
|
208
|
+
),
|
|
209
|
+
"ignored": (
|
|
210
|
+
r"warning: extra tokens at the end of '#pragma omp [^']*' are "
|
|
211
|
+
r"ignored", # *_c_extra_tokens_ignored
|
|
212
|
+
),
|
|
213
|
+
}
|
|
214
|
+
PATTERNS["afar:c"] = {
|
|
215
|
+
"environment": PATTERNS["afar"]["environment"],
|
|
216
|
+
# afar_c_link_device_error: the device image of a target
|
|
217
|
+
# region with an error directive at(compilation) calls __kmpc_error,
|
|
218
|
+
# which the device runtime lacks; _undefined_symbols decides program
|
|
219
|
+
# vs system by the referrer (the program's .img.lto.o)
|
|
220
|
+
"link_undefined": PATTERNS["afar"]["link_undefined"],
|
|
221
|
+
**_CLANG_C,
|
|
222
|
+
"ignored": _CLANG_C["ignored"] + (
|
|
223
|
+
r"; modifier ignored \[-Wopenmp-clauses\]", # afar_c_modifier_ignored
|
|
224
|
+
),
|
|
225
|
+
# Afar_c_link_no_libcall: the AMDGPU back end cannot lower
|
|
226
|
+
# an operation of the program (long double arithmetic)
|
|
227
|
+
"not_implemented": (
|
|
228
|
+
r"^ld\.lld: error: no libcall available for ",
|
|
229
|
+
),
|
|
230
|
+
}
|
|
231
|
+
PATTERNS["cce19:c"] = {
|
|
232
|
+
"environment": PATTERNS["cce19"]["environment"],
|
|
233
|
+
"link_undefined": PATTERNS["cce19"]["link_undefined"],
|
|
234
|
+
"ice": (
|
|
235
|
+
r"PLEASE submit a bug report to ", # cce_c_ice
|
|
236
|
+
r"^clang\S*: error: clang frontend command failed", # cce_c_ice
|
|
237
|
+
),
|
|
238
|
+
"not_implemented": (
|
|
239
|
+
r"error: .* is not yet supported", # cce_c_not_yet_supported
|
|
240
|
+
# Cce_c_unsupported_dynamic_alloca: a variable-length
|
|
241
|
+
# array in a target region
|
|
242
|
+
r"^error: \S+:\d+:\d+: in function .*: unsupported ",
|
|
243
|
+
),
|
|
244
|
+
**_CLANG_C}
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
# NVIDIA HPC SDK 25.11 (nvfortran, nvc) on wingtip, captured from
|
|
248
|
+
# the catalog's own compiles (tests/data/messages/nvhpc_*.txt). NVFORTRAN
|
|
249
|
+
# messages read "NVFORTRAN-<severity>-<number>-<text> (<file>: <line>)",
|
|
250
|
+
# severity I(nform), W(arning), S(evere), F(atal); a compile fails on S or
|
|
251
|
+
# F. nvc prints EDG front-end diagnostics ('"<file>", line N: error: ...':
|
|
252
|
+
# it rejects every OpenMP clause or modifier it does not know, e.g.
|
|
253
|
+
# "invalid text in pragma", 'identifier "ancestor" is undefined') and
|
|
254
|
+
# "NVC++-<severity>-<number>-..." messages of the OpenMP lowering.
|
|
255
|
+
# * ice: the device compiler (NVVM) rejecting code the compiler generated
|
|
256
|
+
# ("nvvmCompileProgram: failed", "nvnvvmd: error:", "Compiler failed to
|
|
257
|
+
# translate accelerator region"), "Compiler failed to translate OpenMP
|
|
258
|
+
# region", LLVM opt rejecting the generated IR, "Internal compiler
|
|
259
|
+
# error".
|
|
260
|
+
# * not_implemented: NVHPC's own "not (yet) implemented", "not supported"
|
|
261
|
+
# ("... is not supported in GPU region", "... not supported in NVIDIA
|
|
262
|
+
# subset", "Only static schedule kind is supported for GPU", "GPU
|
|
263
|
+
# targets do not support ...") and "Unrecognized OpenMP directive" (a
|
|
264
|
+
# warning: the directive is dropped) in a compile that failed.
|
|
265
|
+
# * ignored (a compile that succeeded): "OpenMP feature, <X>, not yet
|
|
266
|
+
# implemented in this version of the compiler" and "Unrecognized OpenMP
|
|
267
|
+
# directive - <name>": the compiler says it dropped the feature.
|
|
268
|
+
# (only captured patterns: a failure no pattern knows is a harness error,
|
|
269
|
+
# never a rejection)
|
|
270
|
+
_NV_ICE = (
|
|
271
|
+
r"^nvvmCompileProgram: failed with error", # nvhpc_ice_nvvm
|
|
272
|
+
r"^nvnvvmd: error: ", # nvhpc_ice_nvvm
|
|
273
|
+
r"Compiler failed to translate accelerator region", # nvhpc_ice_nvvm
|
|
274
|
+
# A front end (fort2, nvcpfe) killed by a signal, also after
|
|
275
|
+
# a diagnostic: the worst message decides (nvhpc_acc_fort2_crash,
|
|
276
|
+
# nvhpc_c_acc_nvcpfe_crash)
|
|
277
|
+
# (signal 9, an OOM or external kill, is the environment:)
|
|
278
|
+
r"^nv\w+-Fatal-\S+ TERMINATED by signal (?!9\b)\d+",
|
|
279
|
+
)
|
|
280
|
+
# A front end killed by signal 9
|
|
281
|
+
_NV_KILLED = (r"^nv\w+-Fatal-\S+ TERMINATED by signal 9\b",)
|
|
282
|
+
PATTERNS["nvhpc"] = {
|
|
283
|
+
"environment": COMMON_ENVIRONMENT + _NV_KILLED, # nvhpc_frontend_killed
|
|
284
|
+
"ice": _NV_ICE,
|
|
285
|
+
"not_implemented": (
|
|
286
|
+
r"^NVFORTRAN-[WSF]-\d+-.*not (?:yet )?implemented", # nvhpc_not_implemented_linear
|
|
287
|
+
r"^NVFORTRAN-[SF]-\d+-.*not supported", # nvhpc_not_supported_gpu_region
|
|
288
|
+
r"^NVFORTRAN-[SF]-\d+-.*Only static schedule kind is supported",
|
|
289
|
+
r"^NVFORTRAN-W-\d+-Unrecognized OpenMP directive", # nvhpc_unrecognized_failed
|
|
290
|
+
),
|
|
291
|
+
"error": (
|
|
292
|
+
r"^NVFORTRAN-[SF]-\d+-", # nvhpc_syntax_error
|
|
293
|
+
),
|
|
294
|
+
"ignored": (
|
|
295
|
+
r"^NVFORTRAN-W-\d+-OpenMP feature, .* not yet implemented", # nvhpc_ignored_aligned
|
|
296
|
+
r"^NVFORTRAN-W-\d+-Unrecognized OpenMP directive", # nvhpc_ignored_unrecognized
|
|
297
|
+
),
|
|
298
|
+
}
|
|
299
|
+
PATTERNS["nvhpc:c"] = {
|
|
300
|
+
"environment": COMMON_ENVIRONMENT + _NV_KILLED,
|
|
301
|
+
"ice": _NV_ICE + (
|
|
302
|
+
r"Compiler failed to translate OpenMP region", # nvhpc_c_ice_translate
|
|
303
|
+
r"Internal compiler error", # nvhpc_c_ice_internal
|
|
304
|
+
r"/llvm/bin/opt: \S+: error: ", # nvhpc_c_ice_llvm_opt
|
|
305
|
+
),
|
|
306
|
+
"not_implemented": (
|
|
307
|
+
# nvhpc_c_not_implemented_bind ("is not implemented yet"),
|
|
308
|
+
# nvhpc_c_not_supported_requires ('... "reverse_offload" is not
|
|
309
|
+
# supported')
|
|
310
|
+
r"^NVC\+\+-[WSF]-\d+-.*not (?:yet )?(?:implemented|supported)",
|
|
311
|
+
r"^NVC\+\+-[SF]-\d+-.*Only static schedule kind is supported",
|
|
312
|
+
r"^NVC\+\+-[SF]-\d+-GPU targets do not support",
|
|
313
|
+
r"error: this OpenMP construct is not supported in NVIDIA subset",
|
|
314
|
+
),
|
|
315
|
+
"error": (
|
|
316
|
+
r'^"\S+", line \d+: (?:catastrophic )?error: ', # nvhpc_c_invalid_pragma
|
|
317
|
+
r"^NVC\+\+-[SF]-\d+-", # nvhpc_c_severe
|
|
318
|
+
),
|
|
319
|
+
"ignored": (),
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
# GCC 16.2 (gfortran, gcc with -foffload; tools/jobs/gcc_offload_build.sh),
|
|
325
|
+
# captured on Tioga (amdgcn) and wingtip (nvptx) from the catalog's own
|
|
326
|
+
# compiles (tests/data/messages/gcc_*.txt; the smoke subset and the
|
|
327
|
+
# compile-only sweep, tools/campaigns/gcc_compile_sweep.py). gfortran prints the
|
|
328
|
+
# location on its own line and the message as "Error: ..." / "Fatal Error:
|
|
329
|
+
# ..." (or "<file>:L:C: Error: ..." for a repeat, "f951: Error: ..." for the
|
|
330
|
+
# end of the file); gcc prints "<file>:L:C: error: ...". "sorry,
|
|
331
|
+
# unimplemented: ..." is GCC's own not-implemented message in both. A
|
|
332
|
+
# gfortran warning that a directive is ignored ("... is ignored
|
|
333
|
+
# [-Wopenmp]") in a successful compile is "ignored". Only captured
|
|
334
|
+
# patterns: an offload link failure no pattern knows stays a harness error
|
|
335
|
+
# (unclassified_compile_failure), never a rejection. Coverage parity
|
|
336
|
+
# captured GCC's ICEs (gcc_ice_*, gcc_c_ice_*): "internal
|
|
337
|
+
# compiler error: ..." from the front end, the middle end and the offload
|
|
338
|
+
# compiler's lto1, always the compiler's own failure wherever it is located.
|
|
339
|
+
# at the start of a line or after a location or program name ("x.c:20:9: ",
|
|
340
|
+
# "lto1: "): never echoed source text
|
|
341
|
+
_GCC_ICE = (r"(?:^|: )internal compiler error: ",)
|
|
342
|
+
# the offload compiler's own generated assembly that its assembler refuses (mkoffload's .s
|
|
343
|
+
# file; a reduced HeCBench program, gcc_c_ice_offload_assembler): the compiler's own failure
|
|
344
|
+
_GCC_ASM = (r"^\S*\.mkoffload\.\d+\.s:\d+:\d+: error: ",)
|
|
345
|
+
_GCC_SORRY = (r"sorry, unimplemented: ",) # gcc_sorry_unimplemented
|
|
346
|
+
# the program's own sources and headers (a located diagnostic of GCC counts
|
|
347
|
+
# only there)
|
|
348
|
+
_GCC_SRC = r"^\S+\.(?:c|h|f90|F90|f|F|f95|f03|f08|inc|fh)"
|
|
349
|
+
# the offload link (mkoffload): detectors only, _undefined_symbols decides
|
|
350
|
+
# program vs system (gcc_link_unresolved_atomic, gcc_link_undefined_probe)
|
|
351
|
+
_GCC_LINK = (r"^unresolved symbol \S+", r"^ld: error: undefined symbol: ")
|
|
352
|
+
PATTERNS["gcc"] = {
|
|
353
|
+
"environment": COMMON_ENVIRONMENT,
|
|
354
|
+
"ice": _GCC_ICE,
|
|
355
|
+
"not_implemented": _GCC_SORRY,
|
|
356
|
+
"link_undefined": _GCC_LINK,
|
|
357
|
+
"error": (
|
|
358
|
+
# gcc_syntax_error, gcc_unclassifiable_directive, gcc_fatal_module,
|
|
359
|
+
# gcc_error_fatal; gcc_acc_located_error; gcc_f951_error
|
|
360
|
+
r"^(?:Fatal )?Error: ",
|
|
361
|
+
r"^\S+:\d+:\d+: Error: ",
|
|
362
|
+
r"^f951: Error: ",
|
|
363
|
+
# gcc_acc_located_lower_error: the middle end's form ("seq overrides
|
|
364
|
+
# other OpenACC loop specifiers"), at a line of the program's own
|
|
365
|
+
# source (GCC: never a generated .s file the offload
|
|
366
|
+
# assembler, llvm-mc, refuses: that is the compiler's own failure)
|
|
367
|
+
_GCC_SRC + r":\d+:\d+: error: ",
|
|
368
|
+
),
|
|
369
|
+
"ignored": (
|
|
370
|
+
r"^Warning: .* is ignored \[-Wopenmp\]", # gcc_ignored_declare_target
|
|
371
|
+
),
|
|
372
|
+
}
|
|
373
|
+
PATTERNS["gcc:c"] = {
|
|
374
|
+
"environment": COMMON_ENVIRONMENT,
|
|
375
|
+
"ice": _GCC_ICE + _GCC_ASM,
|
|
376
|
+
"not_implemented": (
|
|
377
|
+
r"^\S+:\d+:\d+: sorry, unimplemented: ", # gcc_c_sorry_unimplemented
|
|
378
|
+
),
|
|
379
|
+
# gcc_c_link_unresolved_atomic, gcc_c_link_undefined_probe
|
|
380
|
+
"link_undefined": _GCC_LINK,
|
|
381
|
+
# gcc_c_syntax_error, gcc_c_error_fatal: at a line of the program's
|
|
382
|
+
# own source (GCC: not an assembler's .s line)
|
|
383
|
+
"error": (_GCC_SRC + r":\d+:\d+: (?:fatal )?error: ",),
|
|
384
|
+
"ignored": (),
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
def table_key(toolchain: str, lang: str = "f90") -> str:
|
|
388
|
+
"""The message-table key of a toolchain and source language: the
|
|
389
|
+
family (every CCE release shares CCE 19's tables), with ``:c`` for C
|
|
390
|
+
."""
|
|
391
|
+
fam = family(toolchain)
|
|
392
|
+
return f"{fam}:c" if lang == "c" else fam
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
# Recognised notes: warnings that are neither errors nor "ignored", appended
|
|
396
|
+
# to the reason as "; note: <name>" so reports can flag the result (also
|
|
397
|
+
# from real output: cce_single_thread_warning, afar_version_warning_not_ignored).
|
|
398
|
+
NOTES: dict[str, dict[str, str]] = {
|
|
399
|
+
"afar": {
|
|
400
|
+
"version_warning":
|
|
401
|
+
r"is not supported in OpenMP v[\d.]+ on \w+ clause, "
|
|
402
|
+
r"try -fopenmp-version=",
|
|
403
|
+
},
|
|
404
|
+
"cce19": {
|
|
405
|
+
# "An OpenMP parallel construct in a target region is limited to a
|
|
406
|
+
# single thread." (num_threads / if / ordered(n) programs)
|
|
407
|
+
"ftn-7256": r"^ftn-7256 ftn: WARNING",
|
|
408
|
+
},
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
NOTES["afar:c"] = {}
|
|
412
|
+
NOTES["cce19:c"] = {}
|
|
413
|
+
# NVHPC's deprecation warning for use_device_ptr (5.1 deprecated
|
|
414
|
+
# it in favour of use_device_addr), and nvc's internal OpenACC note on a
|
|
415
|
+
# loop bind(parallel) in a declare target routine (its lowering)
|
|
416
|
+
NOTES["nvhpc"] = {
|
|
417
|
+
"deprecated": r"^NVFORTRAN-W-\d+-Use of the \w+ clause is deprecated",
|
|
418
|
+
}
|
|
419
|
+
NOTES["gcc"] = {}
|
|
420
|
+
NOTES["gcc:c"] = {}
|
|
421
|
+
NOTES["nvhpc:c"] = {
|
|
422
|
+
"deprecated": r"warning: The use of \w+ is deprecated",
|
|
423
|
+
"acc_clause_ignored": r"^NVC\+\+-W-\d+-acc loop \w+ clause ignored",
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
CATEGORY_ORDER = ("environment", "ice", "not_implemented", "link_undefined",
|
|
427
|
+
"error", "ignored")
|
|
428
|
+
|
|
429
|
+
# Runtime error termination a negative probe (Program.expect ==
|
|
430
|
+
# "error_termination") must end with: the runtime's message for an
|
|
431
|
+
# absent list item named with the present modifier (captured:
|
|
432
|
+
# afar_run_present_map, afar_run_present_motion, cce_run_present).
|
|
433
|
+
ERROR_TERMINATION: dict[str, tuple[str, ...]] = {
|
|
434
|
+
"afar": (
|
|
435
|
+
r"device mapping required by 'present' (?:map type|motion) modifier "
|
|
436
|
+
r"does not exist",
|
|
437
|
+
),
|
|
438
|
+
"cce19": (
|
|
439
|
+
r"CRAY_ACC_ERROR - Variable not found in present table",
|
|
440
|
+
),
|
|
441
|
+
}
|
|
442
|
+
# C: AFAR's C programs end with libomptarget's message
|
|
443
|
+
# (captured: afar_c_run_present). CCE's C programs never reach a present
|
|
444
|
+
# table message: every map with the present modifier aborts in an assertion
|
|
445
|
+
# of CCE's offload runtime, also when the item is present (captured:
|
|
446
|
+
# cce_c_run_present_assert; data/findings/cce-c-map-present-assert.c), so
|
|
447
|
+
# there is no message to accept and the probe reads as a crash
|
|
448
|
+
ERROR_TERMINATION["afar:c"] = ERROR_TERMINATION["afar"]
|
|
449
|
+
ERROR_TERMINATION["cce19:c"] = ()
|
|
450
|
+
# NVHPC's OpenACC runtime (captured: nvhpc_acc_run_present); its
|
|
451
|
+
# OpenMP Fortran rejects the present modifier at compile time and its C
|
|
452
|
+
# programs run on without a message (no pattern to accept)
|
|
453
|
+
ERROR_TERMINATION["nvhpc"] = (
|
|
454
|
+
r"FATAL ERROR: data in PRESENT clause was not found on device",
|
|
455
|
+
)
|
|
456
|
+
# The OpenACC C programs (nvc -acc) print the same OpenACC runtime
|
|
457
|
+
# message (captured: nvhpc_c_acc_run_present); the OpenMP C programs never
|
|
458
|
+
# print it (they run on without a message)
|
|
459
|
+
ERROR_TERMINATION["nvhpc:c"] = ERROR_TERMINATION["nvhpc"]
|
|
460
|
+
# GCC: libgomp's message, the same for OpenMP and OpenACC, Fortran and C
|
|
461
|
+
# (captured: gcc_run_present, gcc_acc_run_present, gcc_c_run_present)
|
|
462
|
+
ERROR_TERMINATION["gcc"] = (
|
|
463
|
+
r"libgomp: present clause: not present on the device",
|
|
464
|
+
)
|
|
465
|
+
ERROR_TERMINATION["gcc:c"] = ERROR_TERMINATION["gcc"]
|
|
466
|
+
# CCE's present-table miss names the source line of the construct
|
|
467
|
+
# (captured: cce_run_present); it counts only at a directive line of the
|
|
468
|
+
# program that carries the present modifier
|
|
469
|
+
_CCE_MISS_LINE = re.compile(r"find_in_present_table failed for .* from "
|
|
470
|
+
r"\S+?:(\d+)\s*$", re.M)
|
|
471
|
+
_ADDRESS = re.compile(r"0x[0-9a-fA-F]+")
|
|
472
|
+
|
|
473
|
+
# Compile-output probes (Program.expect "compile_message" /
|
|
474
|
+
# "compile_error"): the line of the compiler output that
|
|
475
|
+
# shows the error directive's message as a warning or as an error ({token}
|
|
476
|
+
# is the program's Program.token). Captured: afar_error_warning,
|
|
477
|
+
# afar_error_fatal, cce_error_warning, cce_error_fatal.
|
|
478
|
+
COMPILE_DIAGNOSTIC: dict[str, dict[str, str]] = {
|
|
479
|
+
"afar": {"warning": r"warning: {token}", "error": r"error: {token}"},
|
|
480
|
+
"cce19": {"warning": r"OpenMP Compilation Warning : {token}",
|
|
481
|
+
"error": r"OpenMP Compilation Error : {token}"},
|
|
482
|
+
# C (captured afar_c_error_*, cce_c_error_*): clang's
|
|
483
|
+
# "<file>:L:C: warning: <message> [-Wuser-defined-warnings]"
|
|
484
|
+
"afar:c": {"warning": r"warning: {token}", "error": r"error: {token}"},
|
|
485
|
+
"cce19:c": {"warning": r"warning: {token}", "error": r"error: {token}"},
|
|
486
|
+
# Neither NVHPC compiler prints the error directive's message
|
|
487
|
+
# (nvfortran: "Unrecognized OpenMP directive - error"; nvc rejects
|
|
488
|
+
# at(compilation) as "invalid text in pragma"), so no pattern
|
|
489
|
+
"nvhpc": {}, "nvhpc:c": {},
|
|
490
|
+
# GCC (captured gcc_error_warning, gcc_error_fatal: gfortran's
|
|
491
|
+
# "Warning|Error: $OMP ERROR encountered at (1): <message>";
|
|
492
|
+
# gcc_c_error_warning, gcc_c_error_fatal: gcc's "warning|error: 'pragma
|
|
493
|
+
# omp error' encountered: <message>")
|
|
494
|
+
"gcc": {"warning": r"^Warning: \$OMP ERROR encountered at \(1\): {token}",
|
|
495
|
+
"error": r"^Error: \$OMP ERROR encountered at \(1\): {token}"},
|
|
496
|
+
"gcc:c": {"warning": r"warning: .pragma omp error. encountered: {token}",
|
|
497
|
+
"error": r"error: .pragma omp error. encountered: {token}"},
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
def _diagnostic(tc: Toolchain, kind: str, token: str, text: str) -> str | None:
|
|
502
|
+
pat = COMPILE_DIAGNOSTIC.get(table_key(tc.name, tc.lang), {}).get(kind)
|
|
503
|
+
if not pat or not token:
|
|
504
|
+
return None
|
|
505
|
+
m = re.search(pat.format(token=re.escape(token)), text, re.M)
|
|
506
|
+
if m is None:
|
|
507
|
+
return None
|
|
508
|
+
return text[text.rfind("\n", 0, m.start()) + 1:].split("\n", 1)[0].strip()
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
_SUMMARY = re.compile(r"\s*ftn-(855|894) ftn: ")
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
def classify_message(toolchain: str, text: str,
|
|
515
|
+
categories: Iterable[str] = CATEGORY_ORDER,
|
|
516
|
+
lang: str = "f90") -> tuple[str, str] | None:
|
|
517
|
+
"""The first category (in `categories` order) with a pattern matching
|
|
518
|
+
`text`, and the full line it matched; None if nothing matches. An
|
|
519
|
+
unknown toolchain name uses the common environment patterns only.
|
|
520
|
+
`lang` "c" selects the C compiler's table."""
|
|
521
|
+
table = PATTERNS.get(table_key(toolchain, lang),
|
|
522
|
+
{"environment": COMMON_ENVIRONMENT})
|
|
523
|
+
for cat in categories:
|
|
524
|
+
if cat == "link_undefined":
|
|
525
|
+
if any(re.search(p, text, re.M) for p in table.get(cat, ())):
|
|
526
|
+
found = _undefined_symbols(text)
|
|
527
|
+
if found:
|
|
528
|
+
return found
|
|
529
|
+
continue
|
|
530
|
+
for pat in table.get(cat, ()):
|
|
531
|
+
ms = list(re.finditer(pat, text, re.M))
|
|
532
|
+
# CCE: prefer the root error to the module summaries (ftn-855
|
|
533
|
+
# "errors in module", ftn-894 "module has compile errors")
|
|
534
|
+
m = next((x for x in ms if not _SUMMARY.match(
|
|
535
|
+
text[text.rfind("\n", 0, x.start()) + 1:])), ms[0] if ms
|
|
536
|
+
else None)
|
|
537
|
+
if m:
|
|
538
|
+
start = text.rfind("\n", 0, m.start()) + 1
|
|
539
|
+
lines = text[start:].split("\n")
|
|
540
|
+
line = lines[0].strip()
|
|
541
|
+
# CCE puts the message text on the line after "ftn-N ftn:"
|
|
542
|
+
if re.match(r"ftn-\d+ ftn: ", line) and len(lines) > 1:
|
|
543
|
+
line += " | " + lines[1].strip()
|
|
544
|
+
return cat, line
|
|
545
|
+
return None
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
# (decisions, groups capacity-large-args and
|
|
549
|
+
# capacity-microtask-args): a run-time message by which the offload runtime
|
|
550
|
+
# says the program exceeds one of its capacities (hundreds of mapped
|
|
551
|
+
# arrays or reduction scalars in one kernel). The program is conforming;
|
|
552
|
+
# capacity is the processor's (Fortran 2008 §1.1, C18 §1 p.2): a capacity
|
|
553
|
+
# break point, never a compiler failure. Captured: cce_run_large_args,
|
|
554
|
+
# afar_run_microtask_args.
|
|
555
|
+
CAPACITY: dict[str, tuple[str, ...]] = {
|
|
556
|
+
"cce": (r"CRAY_ACC_ERROR - Large args not supported",),
|
|
557
|
+
"afar": (r"Too many arguments in kmp_invoke_microtask",),
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
def capacity_message(toolchain: str, text: str) -> str | None:
|
|
562
|
+
"""The line of a run's output by which the runtime of `toolchain`
|
|
563
|
+
reports a capacity limit (``CAPACITY``), or None."""
|
|
564
|
+
fam = "cce" if toolchain.startswith("cce") else \
|
|
565
|
+
"afar" if toolchain.startswith("afar") else toolchain
|
|
566
|
+
for pat in CAPACITY.get(fam, ()):
|
|
567
|
+
m = re.search(pat, text or "")
|
|
568
|
+
if m:
|
|
569
|
+
start = (text or "").rfind("\n", 0, m.start()) + 1
|
|
570
|
+
return text[start:].split("\n", 1)[0].strip()
|
|
571
|
+
return None
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
CODES = {"environment": "environment", "ice": "ice",
|
|
575
|
+
"not_implemented": "not_implemented",
|
|
576
|
+
"link_undefined": "link_undefined_symbol", "error": "diagnostic"}
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
def classify_all(toolchain: str, text: str,
|
|
580
|
+
categories: Iterable[str] = CATEGORY_ORDER,
|
|
581
|
+
lang: str = "f90") -> list[tuple[str, str]]:
|
|
582
|
+
"""Every category (in `categories` order, worst first) with
|
|
583
|
+
a pattern matching some message of `text`, with the line it matched
|
|
584
|
+
(``classify_message`` per category). The first entry is the worst
|
|
585
|
+
class, which classifies the failure; a failure is never classified
|
|
586
|
+
by its first message alone (a rejection followed by a front end's
|
|
587
|
+
crash is an ICE)."""
|
|
588
|
+
out = []
|
|
589
|
+
for cat in categories:
|
|
590
|
+
found = classify_message(toolchain, text, (cat,), lang)
|
|
591
|
+
if found:
|
|
592
|
+
out.append(found)
|
|
593
|
+
return out
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+
def messages_of(toolchain: str, text: str, lang: str = "f90") -> str:
|
|
597
|
+
"""The classified messages of a failed compile, worst first, as
|
|
598
|
+
``"<code>: <line> | <code>: <line>"`` (Result.messages)."""
|
|
599
|
+
return " || ".join(f"{CODES[c]}: {line}" for c, line in classify_all(
|
|
600
|
+
toolchain, text, CATEGORY_ORDER[:-1], lang))
|
|
601
|
+
|
|
602
|
+
|
|
603
|
+
_LD_REF = re.compile(r"^\S*ld: (\S+?): undefined reference to `")
|
|
604
|
+
_LD_FUNC = re.compile(r"^\S*ld: (\S+?): in function ")
|
|
605
|
+
_LLD_BY = re.compile(r"^>>> referenced by (\S+?)(?::\(|\s|$)")
|
|
606
|
+
# the system directories and every compiler install of the catalog (an
|
|
607
|
+
# AFAR release directory sits in the vendor directory with its siblings:
|
|
608
|
+
# that directory)
|
|
609
|
+
_SYSTEM_PREFIXES = ("/opt/", "/usr/", "/lib", "/collab/") + tuple(
|
|
610
|
+
(str(Path(r).parent) if Path(r).name.startswith("therock-afar") else r.rstrip("/")) + "/"
|
|
611
|
+
for r in install_roots())
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
def _is_system(path: str) -> bool:
|
|
615
|
+
"""A file of the installed toolchain or system, not of the program."""
|
|
616
|
+
return (re.search(r"\.so(\.\d+)*$", path) is not None
|
|
617
|
+
or path.startswith(_SYSTEM_PREFIXES) or "/rocm" in path)
|
|
618
|
+
|
|
619
|
+
|
|
620
|
+
def _undefined_symbols(text: str) -> tuple[str, str] | None:
|
|
621
|
+
"""Classify a link failure on undefined symbols by WHO references them:
|
|
622
|
+
any system library or toolchain file -> ("environment", line); only the
|
|
623
|
+
program's own objects (in the per-run directory: <tmp>/pe_*/<prog>_1.o,
|
|
624
|
+
CCE's generated a.out-cce-openmp__llc.amdgpu) -> ("link_undefined",
|
|
625
|
+
line); no referrer found -> None (an unclassified failure)."""
|
|
626
|
+
lines = text.split("\n")
|
|
627
|
+
program: str | None = None
|
|
628
|
+
for i, line in enumerate(lines):
|
|
629
|
+
refs: list[str] = []
|
|
630
|
+
if "undefined reference to `" in line:
|
|
631
|
+
m = _LD_REF.match(line)
|
|
632
|
+
if m:
|
|
633
|
+
refs.append(m.group(1))
|
|
634
|
+
else: # "<obj>:(.text+0x..): ..." after "ld: <file>: in function"
|
|
635
|
+
for back in reversed(lines[:i]):
|
|
636
|
+
f = _LD_FUNC.match(back)
|
|
637
|
+
if f:
|
|
638
|
+
refs.append(f.group(1))
|
|
639
|
+
break
|
|
640
|
+
elif line.startswith("unresolved symbol "):
|
|
641
|
+
# GCC's nvptx-ld (the offload link in mkoffload) names no
|
|
642
|
+
# referrer: it links the program's device image with the
|
|
643
|
+
# toolchain's archives, so the reference is the program's
|
|
644
|
+
if program is None:
|
|
645
|
+
program = line.strip()
|
|
646
|
+
continue
|
|
647
|
+
elif "ld: error: undefined symbol: " in line:
|
|
648
|
+
# lld as "ld.lld:", "lld:" or (GCC's amdgcn offload link) "ld:"
|
|
649
|
+
for nxt in lines[i + 1:]:
|
|
650
|
+
m = _LLD_BY.match(nxt)
|
|
651
|
+
if not nxt.startswith(">>>"):
|
|
652
|
+
break
|
|
653
|
+
if m:
|
|
654
|
+
refs.append(m.group(1))
|
|
655
|
+
for ref in refs:
|
|
656
|
+
if _is_system(ref):
|
|
657
|
+
return "environment", line.strip()
|
|
658
|
+
if program is None:
|
|
659
|
+
program = line.strip()
|
|
660
|
+
return ("link_undefined", program) if program else None
|
|
661
|
+
|
|
662
|
+
|
|
663
|
+
# --- running commands ------------------------------------------------------------------
|
|
664
|
+
|
|
665
|
+
@dataclass(frozen=True)
|
|
666
|
+
class _Exec:
|
|
667
|
+
rc: int | None # None after a timeout
|
|
668
|
+
stdout: str
|
|
669
|
+
stderr: str
|
|
670
|
+
|
|
671
|
+
@property
|
|
672
|
+
def timed_out(self) -> bool:
|
|
673
|
+
return self.rc is None
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
def _kill_group(pgid: int) -> None:
|
|
677
|
+
try:
|
|
678
|
+
os.killpg(pgid, signal.SIGKILL)
|
|
679
|
+
except (ProcessLookupError, PermissionError):
|
|
680
|
+
pass
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
# On a shared node without a scheduler (wingtip) at most one
|
|
684
|
+
# program runs on a GPU at a time while compiles stay parallel:
|
|
685
|
+
# COMPLIANT_RUN_SLOTS=1 makes every program run take an exclusive lock on
|
|
686
|
+
# a file per visible GPU (CUDA_VISIBLE_DEVICES; flock, so threads and the
|
|
687
|
+
# worker processes of a multiprocessing pool alike wait for it;
|
|
688
|
+
# tools/jobs/run_wingtip.sh). A run script is one that ends by exec-ing the
|
|
689
|
+
# program (harness.run_script, offload.engine.confirm.execute.run_script); the
|
|
690
|
+
# timeout starts once the lock is held. Unset (Tuolumne, Tioga): no lock,
|
|
691
|
+
# nothing changes.
|
|
692
|
+
def _run_lock_path() -> str | None:
|
|
693
|
+
if not os.environ.get("COMPLIANT_RUN_SLOTS"):
|
|
694
|
+
return None
|
|
695
|
+
if os.environ["COMPLIANT_RUN_SLOTS"] != "1":
|
|
696
|
+
raise ValueError("COMPLIANT_RUN_SLOTS supports 1 (one program per "
|
|
697
|
+
"GPU) only")
|
|
698
|
+
gpu = os.environ.get("CUDA_VISIBLE_DEVICES", "all").replace(",", "_")
|
|
699
|
+
return os.path.join(tempfile.gettempdir(),
|
|
700
|
+
f"compliant-run-{os.getuid()}-gpu{gpu}.lock")
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
def _is_run_script(script: str) -> bool:
|
|
704
|
+
lines = script.rstrip().split("\n")
|
|
705
|
+
return bool(lines) and lines[-1].startswith("exec ")
|
|
706
|
+
|
|
707
|
+
|
|
708
|
+
def _execute(script: str, cwd: Path, timeout_s: float,
|
|
709
|
+
merge: bool = False) -> _Exec:
|
|
710
|
+
"""Run `script` with bash in its own process group; kill the whole group
|
|
711
|
+
at the timeout and after the script ends (no stray children), and end
|
|
712
|
+
the group when the runner dies or stops (``_die_with_parent``, the
|
|
713
|
+
watchdog). A
|
|
714
|
+
program run waits for the GPU's run lock first when
|
|
715
|
+
COMPLIANT_RUN_SLOTS is set."""
|
|
716
|
+
lock = _run_lock_path()
|
|
717
|
+
if lock is not None and _is_run_script(script):
|
|
718
|
+
import fcntl
|
|
719
|
+
with open(lock, "a") as fh:
|
|
720
|
+
fcntl.flock(fh, fcntl.LOCK_EX)
|
|
721
|
+
try:
|
|
722
|
+
return _execute_now(script, cwd, timeout_s, merge)
|
|
723
|
+
finally:
|
|
724
|
+
fcntl.flock(fh, fcntl.LOCK_UN)
|
|
725
|
+
return _execute_now(script, cwd, timeout_s, merge)
|
|
726
|
+
|
|
727
|
+
|
|
728
|
+
@lru_cache(maxsize=None)
|
|
729
|
+
def _prctl():
|
|
730
|
+
"""libc's prctl, loaded in the parent (a preexec_fn must not import:
|
|
731
|
+
another thread may hold the import lock at the fork); None where there
|
|
732
|
+
is none."""
|
|
733
|
+
try:
|
|
734
|
+
import ctypes
|
|
735
|
+
return ctypes.CDLL(None, use_errno=True).prctl
|
|
736
|
+
except (OSError, AttributeError):
|
|
737
|
+
return None
|
|
738
|
+
|
|
739
|
+
|
|
740
|
+
def _die_with_parent(parent: int, sig: int = signal.SIGKILL):
|
|
741
|
+
"""A preexec_fn: the child gets `sig` when the thread that started it
|
|
742
|
+
exits (Linux PR_SET_PDEATHSIG, kept across exec).
|
|
743
|
+
The run is in its own session, so killing the runner (a campaign
|
|
744
|
+
stopped by hand, a pool worker that dies) did not reach it: n1x0 seed
|
|
745
|
+
72 ran on two A100s for 12.5 hours after its first campaign was
|
|
746
|
+
stopped. Without prctl: nothing."""
|
|
747
|
+
prctl = _prctl()
|
|
748
|
+
|
|
749
|
+
def setup() -> None:
|
|
750
|
+
if prctl is None:
|
|
751
|
+
return
|
|
752
|
+
prctl(1, int(sig), 0, 0, 0) # PR_SET_PDEATHSIG
|
|
753
|
+
if os.getppid() != parent: # the runner died before the prctl
|
|
754
|
+
os._exit(1)
|
|
755
|
+
return setup
|
|
756
|
+
|
|
757
|
+
|
|
758
|
+
# The death signal reaches the direct
|
|
759
|
+
# child only, so a compiler or program the script starts survived its
|
|
760
|
+
# runner (seed 72; the six-day AFAR clangs ran outside the
|
|
761
|
+
# harness). Every run therefore has a watchdog: a small bash process in its
|
|
762
|
+
# own session (outside the run's process group) whose stdin is the read end
|
|
763
|
+
# of a pipe only the runner holds the write end of. It wakes when that pipe
|
|
764
|
+
# reaches EOF (the runner died, by any signal: the kernel closes its fds) or
|
|
765
|
+
# at the limit plus GRACE_S (the runner's own timer normally fires first;
|
|
766
|
+
# this covers a stopped or hung runner). Either way it sends the run's whole
|
|
767
|
+
# process group SIGTERM, then SIGKILL after KILL_AFTER_S, so a grandchild
|
|
768
|
+
# that ignores TERM is ended too. The runner stops the watchdog when the run
|
|
769
|
+
# is over. A pipe, not a death signal, tells the watchdog: there is no
|
|
770
|
+
# window before a trap is installed, and it does not depend
|
|
771
|
+
# on the forking thread (PR_SET_PDEATHSIG fires when the *thread* that
|
|
772
|
+
# forked exits). The direct child keeps PR_SET_PDEATHSIG (SIGKILL): every
|
|
773
|
+
# caller (thread pools in run_matrix, mutate, minimize, the tests' bounded
|
|
774
|
+
# map, ...) blocks in _execute until the run is over, and a Python thread
|
|
775
|
+
# cannot exit inside a call, so its thread outlives its run. Limits: a
|
|
776
|
+
# descendant that leaves the run's process group (setsid, setpgid: a job
|
|
777
|
+
# launcher such as srun, mpirun or flux) is reached neither by the runner's
|
|
778
|
+
# killpg nor by the watchdog; and a process forked (without exec) while a
|
|
779
|
+
# runner holds its pipe keeps the pipe open, so the watchdog then waits for
|
|
780
|
+
# its deadline. (Fix used coreutils timeout, which exits as soon as
|
|
781
|
+
# its child does and so never sent the KILL to a TERM-ignoring grandchild;
|
|
782
|
+
# The watchdog took SIGTERM by PR_SET_PDEATHSIG.)
|
|
783
|
+
KILL_AFTER_S = 10
|
|
784
|
+
GRACE_S = 2
|
|
785
|
+
_WATCHDOG = r"""
|
|
786
|
+
g=$1; k=$2
|
|
787
|
+
read -r -t "$3" _
|
|
788
|
+
kill -TERM -- "-$g" 2>/dev/null || exit 0
|
|
789
|
+
sleep "$k"
|
|
790
|
+
kill -KILL -- "-$g" 2>/dev/null
|
|
791
|
+
exit 0
|
|
792
|
+
"""
|
|
793
|
+
|
|
794
|
+
|
|
795
|
+
@dataclass
|
|
796
|
+
class Watchdog:
|
|
797
|
+
proc: subprocess.Popen
|
|
798
|
+
runner_end: int | None # the pipe's write end, held by the runner
|
|
799
|
+
|
|
800
|
+
def close_runner_end(self) -> None:
|
|
801
|
+
if self.runner_end is not None:
|
|
802
|
+
os.close(self.runner_end)
|
|
803
|
+
self.runner_end = None
|
|
804
|
+
|
|
805
|
+
|
|
806
|
+
def watch_group(pgid: int, limit_s: float,
|
|
807
|
+
kill_after_s: float = KILL_AFTER_S) -> Watchdog | None:
|
|
808
|
+
"""Start the watchdog (above) of a process group the caller started
|
|
809
|
+
(Popen(..., start_new_session=True): pgid is its pid): at EOF of the
|
|
810
|
+
caller's pipe (the caller died) or `limit_s` seconds from now it sends
|
|
811
|
+
the group SIGTERM, then SIGKILL `kill_after_s` seconds later. The caller
|
|
812
|
+
must call ``stop_watch`` when the group is done (or killed). None if the
|
|
813
|
+
watchdog cannot start. Shared with offload.engine.stress_exec.run_group
|
|
814
|
+
."""
|
|
815
|
+
r, w = os.pipe() # not inheritable: only the watchdog gets r (stdin)
|
|
816
|
+
try:
|
|
817
|
+
proc = subprocess.Popen(
|
|
818
|
+
["bash", "-c", _WATCHDOG, "watchdog", str(pgid),
|
|
819
|
+
f"{kill_after_s:g}", f"{limit_s:g}"],
|
|
820
|
+
stdin=r, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL,
|
|
821
|
+
start_new_session=True)
|
|
822
|
+
except OSError:
|
|
823
|
+
os.close(w)
|
|
824
|
+
return None
|
|
825
|
+
finally:
|
|
826
|
+
os.close(r)
|
|
827
|
+
return Watchdog(proc, w)
|
|
828
|
+
|
|
829
|
+
|
|
830
|
+
def stop_watch(dog: Watchdog | None) -> None:
|
|
831
|
+
"""Stop a watchdog of ``watch_group`` (its whole group, then the
|
|
832
|
+
caller's pipe); None: nothing."""
|
|
833
|
+
if dog is not None:
|
|
834
|
+
_kill_group(dog.proc.pid)
|
|
835
|
+
dog.proc.wait()
|
|
836
|
+
dog.close_runner_end()
|
|
837
|
+
|
|
838
|
+
|
|
839
|
+
def _watchdog(pgid: int, timeout_s: float) -> Watchdog | None:
|
|
840
|
+
"""The watchdog of a harness run: the limit plus GRACE_S."""
|
|
841
|
+
return watch_group(pgid, timeout_s + GRACE_S)
|
|
842
|
+
|
|
843
|
+
|
|
844
|
+
_stop_watchdog = stop_watch
|
|
845
|
+
|
|
846
|
+
|
|
847
|
+
def _execute_now(script: str, cwd: Path, timeout_s: float,
|
|
848
|
+
merge: bool = False) -> _Exec:
|
|
849
|
+
# the caller's OpenMP/offload settings must not leak into a run (the
|
|
850
|
+
# scripts set what they need); ROCR_*/other HSA_* stay, since a batch
|
|
851
|
+
# allocation may use them to assign the GPU;
|
|
852
|
+
# GCC's libgomp reads GOMP_* and GCN_* (GOMP_DEBUG, GCN_STACK_SIZE)
|
|
853
|
+
env = {k: v for k, v in os.environ.items()
|
|
854
|
+
if not k.startswith(("OMP_", "LIBOMPTARGET_", "CRAY_ACC_",
|
|
855
|
+
"NVCOMPILER_", "ACC_", "GOMP_",
|
|
856
|
+
"GCN_"))}
|
|
857
|
+
env.pop("HSA_XNACK", None)
|
|
858
|
+
env["TMPDIR"] = str(cwd)
|
|
859
|
+
p = subprocess.Popen(["bash", "-c", script], cwd=cwd, env=env,
|
|
860
|
+
stdout=subprocess.PIPE,
|
|
861
|
+
stderr=subprocess.STDOUT if merge else subprocess.PIPE,
|
|
862
|
+
text=True, errors="replace", start_new_session=True,
|
|
863
|
+
preexec_fn=_die_with_parent(os.getpid()))
|
|
864
|
+
dog = _watchdog(p.pid, timeout_s)
|
|
865
|
+
try:
|
|
866
|
+
try:
|
|
867
|
+
out, err = p.communicate(timeout=timeout_s)
|
|
868
|
+
rc: int | None = p.returncode
|
|
869
|
+
except subprocess.TimeoutExpired:
|
|
870
|
+
_kill_group(p.pid)
|
|
871
|
+
try:
|
|
872
|
+
out, err = p.communicate(timeout=10)
|
|
873
|
+
except subprocess.TimeoutExpired: # a process left the group
|
|
874
|
+
p.kill()
|
|
875
|
+
out, err = "", ""
|
|
876
|
+
rc = None
|
|
877
|
+
_kill_group(p.pid)
|
|
878
|
+
finally:
|
|
879
|
+
_stop_watchdog(dog)
|
|
880
|
+
return _Exec(rc, out or "", err or "")
|
|
881
|
+
|
|
882
|
+
|
|
883
|
+
def _setup(tc: Toolchain, tmpdir: str | None) -> list[str]:
|
|
884
|
+
# TMPDIR is exported AFTER the prelude: /etc/profile (sourced by the
|
|
885
|
+
# CCE prelude) resets it to the user's /var/tmp directory
|
|
886
|
+
lines = ["ulimit -c 0"]
|
|
887
|
+
if tc.prelude:
|
|
888
|
+
lines += [tc.prelude, "ulimit -c 0"]
|
|
889
|
+
if tmpdir is not None:
|
|
890
|
+
lines.append(f"export TMPDIR={shlex.quote(tmpdir)}")
|
|
891
|
+
return lines
|
|
892
|
+
|
|
893
|
+
|
|
894
|
+
def compile_script(tc: Toolchain, src: str, exe: str, opt: str,
|
|
895
|
+
tmpdir: str | None = None) -> str:
|
|
896
|
+
"""The bash script that compiles `src` (non-strict, no pipes, no core
|
|
897
|
+
dumps, the prelude, TMPDIR, then the prelude-free compile_cmd)."""
|
|
898
|
+
bare = dataclasses.replace(tc, prelude="")
|
|
899
|
+
return "\n".join(_setup(tc, tmpdir)
|
|
900
|
+
+ [bare.compile_cmd(src, exe, opt)]) + "\n"
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
# Files of a set that are included, not compiled (headers)
|
|
904
|
+
HEADER_SUFFIXES = (".h", ".hh", ".hpp", ".hxx", ".inc", ".fh", ".fi")
|
|
905
|
+
|
|
906
|
+
|
|
907
|
+
def object_names(files: list[str]) -> list[tuple[str, str]]:
|
|
908
|
+
"""[(source, object)] of the translation units of a file set, in
|
|
909
|
+
order: every suffix is replaced (.f90, .F90, .f, .F, .c, .cpp, ...;
|
|
910
|
+
task-40a-review: a ``.F90`` name kept its suffix and ``-o x.F90``
|
|
911
|
+
overwrote the source), a name without a suffix gets ``.o`` appended,
|
|
912
|
+
two sources with one stem get distinct objects, and headers
|
|
913
|
+
(``HEADER_SUFFIXES``) are not compiled."""
|
|
914
|
+
out, used = [], set()
|
|
915
|
+
for k, f in enumerate(files):
|
|
916
|
+
p = Path(f)
|
|
917
|
+
if p.suffix.lower() in HEADER_SUFFIXES:
|
|
918
|
+
continue
|
|
919
|
+
obj = str(p.with_suffix(".o")) if p.suffix else f + ".o"
|
|
920
|
+
if obj in used or obj == f:
|
|
921
|
+
obj = str(p.with_name(f"{p.stem}_{k}.o"))
|
|
922
|
+
used.add(obj)
|
|
923
|
+
out.append((f, obj))
|
|
924
|
+
return out
|
|
925
|
+
|
|
926
|
+
|
|
927
|
+
def compile_set_script(tc: Toolchain, files: list[str], exe: str, opt: str,
|
|
928
|
+
tmpdir: str | None = None) -> str:
|
|
929
|
+
"""The bash script that compiles a set of files (a fuzz
|
|
930
|
+
bundle) one translation unit at a time with -c, in the given order
|
|
931
|
+
(modules before their users), then links the objects; each step runs
|
|
932
|
+
only if the previous one succeeded (&&, no strict mode)."""
|
|
933
|
+
bare = dataclasses.replace(tc, prelude="")
|
|
934
|
+
pairs = object_names(files)
|
|
935
|
+
steps = [bare.compile_cmd(f"-c {f}", o, opt) for f, o in pairs]
|
|
936
|
+
objs = " ".join(o for _, o in pairs)
|
|
937
|
+
steps.append(bare.compile_cmd(objs, exe, opt))
|
|
938
|
+
return "\n".join(_setup(tc, tmpdir) + [" && \\\n".join(steps)]) + "\n"
|
|
939
|
+
|
|
940
|
+
|
|
941
|
+
def run_script(tc: Toolchain, exe: str, xnack: int, mandatory: bool,
|
|
942
|
+
tmpdir: str | None = None, offload: str | None = None) -> str:
|
|
943
|
+
"""The bash script that runs `exe` (non-strict, no pipes, no core
|
|
944
|
+
dumps, the toolchain prelude, TMPDIR, memory mode, offload policy; an
|
|
945
|
+
OpenACC toolchain has no offload policy). `offload`, when given, is the
|
|
946
|
+
OMP_TARGET_OFFLOAD value and overrides `mandatory` (the host
|
|
947
|
+
reference runs use "disabled")."""
|
|
948
|
+
lines = _setup(tc, tmpdir)
|
|
949
|
+
lines += [f"export {k}={shlex.quote(v)}"
|
|
950
|
+
for k, v in tc.run_env(xnack).items()]
|
|
951
|
+
if tc.model == "acc":
|
|
952
|
+
lines.append("unset OMP_TARGET_OFFLOAD")
|
|
953
|
+
elif offload is not None:
|
|
954
|
+
lines.append(f"export OMP_TARGET_OFFLOAD={shlex.quote(offload)}")
|
|
955
|
+
else:
|
|
956
|
+
lines.append("export OMP_TARGET_OFFLOAD=mandatory" if mandatory
|
|
957
|
+
else "unset OMP_TARGET_OFFLOAD")
|
|
958
|
+
lines.append(f"exec {shlex.quote(exe)}")
|
|
959
|
+
return "\n".join(lines) + "\n"
|
|
960
|
+
|
|
961
|
+
|
|
962
|
+
# --- one run (primary, then without mandatory if needed) ----------------------------
|
|
963
|
+
|
|
964
|
+
RESULT_RE = re.compile(r"^RESULT ran_on_host=([01]) check=(pass|fail)\s*$",
|
|
965
|
+
re.M)
|
|
966
|
+
|
|
967
|
+
|
|
968
|
+
@dataclass(frozen=True)
|
|
969
|
+
class _Trial:
|
|
970
|
+
outcome: Outcome
|
|
971
|
+
reason: str
|
|
972
|
+
stdout: str
|
|
973
|
+
stderr: str
|
|
974
|
+
|
|
975
|
+
|
|
976
|
+
def _observation(ex: _Exec) -> tuple[int, str] | None:
|
|
977
|
+
found = RESULT_RE.findall(ex.stdout)
|
|
978
|
+
if ex.rc == 0 and len(found) == 1:
|
|
979
|
+
return int(found[0][0]), found[0][1]
|
|
980
|
+
return None
|
|
981
|
+
|
|
982
|
+
|
|
983
|
+
def _failure(ex: _Exec) -> str:
|
|
984
|
+
if ex.timed_out:
|
|
985
|
+
return "timeout"
|
|
986
|
+
if ex.rc is not None and ex.rc < 0:
|
|
987
|
+
try:
|
|
988
|
+
return f"crash: {signal.Signals(-ex.rc).name}"
|
|
989
|
+
except ValueError:
|
|
990
|
+
return f"crash: signal {-ex.rc}"
|
|
991
|
+
if ex.rc != 0:
|
|
992
|
+
return f"exit_status: {ex.rc}"
|
|
993
|
+
if len(RESULT_RE.findall(ex.stdout)) > 1:
|
|
994
|
+
return "multiple_result_lines"
|
|
995
|
+
return "no_result_line"
|
|
996
|
+
|
|
997
|
+
|
|
998
|
+
def _from_observation(obs: tuple[int, str]) -> tuple[Outcome, str]:
|
|
999
|
+
host, check = obs
|
|
1000
|
+
text = f"ran_on_host={host} check={check}"
|
|
1001
|
+
if check == "fail":
|
|
1002
|
+
return Outcome.wrong_answer, f"check_fail: {text}"
|
|
1003
|
+
return (Outcome.fell_back_to_host if host else Outcome.correct_on_device,
|
|
1004
|
+
text)
|
|
1005
|
+
|
|
1006
|
+
|
|
1007
|
+
def _env_failure(tc: Toolchain, ex: _Exec) -> str | None:
|
|
1008
|
+
found = classify_message(tc.name, ex.stdout + "\n" + ex.stderr,
|
|
1009
|
+
("environment",), tc.lang)
|
|
1010
|
+
return f"environment: {found[1]}" if found else None
|
|
1011
|
+
|
|
1012
|
+
|
|
1013
|
+
def _trial(tc: Toolchain, exe: Path, xnack: int, cwd: Path,
|
|
1014
|
+
timeout_s: float) -> _Trial:
|
|
1015
|
+
first = _execute(run_script(tc, str(exe), xnack, True, str(cwd)), cwd,
|
|
1016
|
+
timeout_s)
|
|
1017
|
+
log = f"--- run (OMP_TARGET_OFFLOAD=mandatory, rc={first.rc}) ---\n" \
|
|
1018
|
+
+ first.stderr
|
|
1019
|
+
if first.timed_out:
|
|
1020
|
+
return _Trial(Outcome.wrong_answer, "timeout", first.stdout, log)
|
|
1021
|
+
obs = _observation(first)
|
|
1022
|
+
if obs:
|
|
1023
|
+
return _Trial(*_from_observation(obs), first.stdout, log)
|
|
1024
|
+
env = _env_failure(tc, first)
|
|
1025
|
+
if env:
|
|
1026
|
+
return _Trial(Outcome.harness_error, env, first.stdout, log)
|
|
1027
|
+
why = _failure(first)
|
|
1028
|
+
if tc.model == "acc": # one run: no offload policy to relax
|
|
1029
|
+
return _Trial(Outcome.wrong_answer, why, first.stdout, log)
|
|
1030
|
+
second = _execute(run_script(tc, str(exe), xnack, False, str(cwd)), cwd,
|
|
1031
|
+
timeout_s)
|
|
1032
|
+
log += f"\n--- run (OMP_TARGET_OFFLOAD unset, rc={second.rc}) ---\n" \
|
|
1033
|
+
+ second.stderr
|
|
1034
|
+
out = first.stdout + second.stdout
|
|
1035
|
+
env = _env_failure(tc, second)
|
|
1036
|
+
if env:
|
|
1037
|
+
return _Trial(Outcome.harness_error, f"{env}; mandatory run: {why}",
|
|
1038
|
+
out, log)
|
|
1039
|
+
obs = _observation(second)
|
|
1040
|
+
if obs is None:
|
|
1041
|
+
return _Trial(Outcome.wrong_answer,
|
|
1042
|
+
f"{why}; without mandatory: {_failure(second)}", out, log)
|
|
1043
|
+
outcome, text = _from_observation(obs)
|
|
1044
|
+
if outcome == Outcome.correct_on_device:
|
|
1045
|
+
return _Trial(Outcome.wrong_answer,
|
|
1046
|
+
f"mandatory_failed_device_pass_without: {why}; "
|
|
1047
|
+
f"without mandatory: {text}", out, log)
|
|
1048
|
+
if outcome == Outcome.fell_back_to_host:
|
|
1049
|
+
return _Trial(outcome, f"mandatory_refused: {why}; without "
|
|
1050
|
+
f"mandatory: {text}", out, log)
|
|
1051
|
+
return _Trial(outcome, f"{text}; mandatory run: {why}; without "
|
|
1052
|
+
"mandatory", out, log)
|
|
1053
|
+
|
|
1054
|
+
|
|
1055
|
+
_DIRECTIVE_START = re.compile(r"^\s*(?:!\$omp|!\$acc|#\s*pragma\s+(?:omp|acc))",
|
|
1056
|
+
re.I)
|
|
1057
|
+
|
|
1058
|
+
|
|
1059
|
+
def _directive_at(lines: list[str], k: int) -> str | None:
|
|
1060
|
+
"""The whole directive that physical line k (1-based) belongs to: its
|
|
1061
|
+
first line with every continuation line (Fortran ``&`` / ``!$omp&``,
|
|
1062
|
+
C backslash), lowercased; None when line k is not in a directive."""
|
|
1063
|
+
if not 1 <= k <= len(lines):
|
|
1064
|
+
return None
|
|
1065
|
+
cont = ("&", "\\")
|
|
1066
|
+
i = j = k - 1
|
|
1067
|
+
while i > 0 and lines[i - 1].rstrip().endswith(cont):
|
|
1068
|
+
i -= 1
|
|
1069
|
+
while j < len(lines) - 1 and lines[j].rstrip().endswith(cont):
|
|
1070
|
+
j += 1
|
|
1071
|
+
if not _DIRECTIVE_START.match(lines[i]):
|
|
1072
|
+
return None
|
|
1073
|
+
return " ".join(lines[i:j + 1]).lower()
|
|
1074
|
+
|
|
1075
|
+
|
|
1076
|
+
def _probe_line_ok(tc: Toolchain, source: str, text: str) -> bool:
|
|
1077
|
+
"""For CCE, the present-table miss must be at a directive carrying the
|
|
1078
|
+
present modifier, on the named line or on one of the directive's
|
|
1079
|
+
continuation lines; AFAR's message is
|
|
1080
|
+
specific to the modifier."""
|
|
1081
|
+
if family(tc.name) != "cce19":
|
|
1082
|
+
return True
|
|
1083
|
+
lines = source.splitlines()
|
|
1084
|
+
for m in _CCE_MISS_LINE.finditer(text):
|
|
1085
|
+
d = _directive_at(lines, int(m.group(1)))
|
|
1086
|
+
if d is not None and "present" in d:
|
|
1087
|
+
return True
|
|
1088
|
+
return False
|
|
1089
|
+
|
|
1090
|
+
|
|
1091
|
+
def probe_termination(toolchain: str, lang: str, source: str,
|
|
1092
|
+
text: str) -> str | None:
|
|
1093
|
+
"""The line of a run's output (`text`: stdout and stderr) that shows
|
|
1094
|
+
the negative probe's error termination on `toolchain`
|
|
1095
|
+
(ERROR_TERMINATION of its family and language, with the line check of
|
|
1096
|
+
``_probe_line_ok``), or None. Shared by the harness and
|
|
1097
|
+
offload.engine.expected.run_on."""
|
|
1098
|
+
tc = Toolchain(toolchain, "", "", lang=lang) \
|
|
1099
|
+
if not isinstance(toolchain, Toolchain) else toolchain
|
|
1100
|
+
for pat in ERROR_TERMINATION.get(table_key(tc.name, tc.lang), ()):
|
|
1101
|
+
m = re.search(pat, text, re.M)
|
|
1102
|
+
if m and _probe_line_ok(tc, source, text):
|
|
1103
|
+
return text[text.rfind("\n", 0, m.start()) + 1:].split(
|
|
1104
|
+
"\n", 1)[0]
|
|
1105
|
+
return None
|
|
1106
|
+
|
|
1107
|
+
|
|
1108
|
+
def _error_trial(tc: Toolchain, exe: Path, xnack: int, cwd: Path,
|
|
1109
|
+
timeout_s: float, source: str = "") -> _Trial:
|
|
1110
|
+
"""One run of a negative probe (Program.expect == "error_termination"),
|
|
1111
|
+
with OMP_TARGET_OFFLOAD=mandatory only (a host fallback cannot pass
|
|
1112
|
+
silently: the runtime aborts with another message). Abnormal end (or no
|
|
1113
|
+
RESULT line) with a message of ERROR_TERMINATION[toolchain] ->
|
|
1114
|
+
correct_on_device (``error_termination: <line>``); a completed run
|
|
1115
|
+
(it prints check=fail) -> wrong_answer (``no_error_termination:
|
|
1116
|
+
...``); any other failure -> wrong_answer (``...; no expected error
|
|
1117
|
+
message``); an environment failure -> harness_error."""
|
|
1118
|
+
first = _execute(run_script(tc, str(exe), xnack, True, str(cwd)), cwd,
|
|
1119
|
+
timeout_s)
|
|
1120
|
+
log = f"--- run (OMP_TARGET_OFFLOAD=mandatory, rc={first.rc}) ---\n" \
|
|
1121
|
+
+ first.stderr
|
|
1122
|
+
if first.timed_out:
|
|
1123
|
+
return _Trial(Outcome.wrong_answer, "timeout", first.stdout, log)
|
|
1124
|
+
obs = _observation(first)
|
|
1125
|
+
if obs:
|
|
1126
|
+
host, check = obs
|
|
1127
|
+
return _Trial(Outcome.wrong_answer, f"no_error_termination: "
|
|
1128
|
+
f"ran_on_host={host} check={check}", first.stdout, log)
|
|
1129
|
+
env = _env_failure(tc, first)
|
|
1130
|
+
if env:
|
|
1131
|
+
return _Trial(Outcome.harness_error, env, first.stdout, log)
|
|
1132
|
+
text = first.stdout + "\n" + first.stderr
|
|
1133
|
+
line = probe_termination(tc, tc.lang, source, text)
|
|
1134
|
+
if line is not None:
|
|
1135
|
+
# no host address in the reason: repeats compare reasons
|
|
1136
|
+
line = _ADDRESS.sub("0x...", line.strip())
|
|
1137
|
+
return _Trial(Outcome.correct_on_device,
|
|
1138
|
+
f"error_termination: {line}", first.stdout, log)
|
|
1139
|
+
return _Trial(Outcome.wrong_answer, f"{_failure(first)}; no expected "
|
|
1140
|
+
"error message", first.stdout, log)
|
|
1141
|
+
|
|
1142
|
+
|
|
1143
|
+
# --- the whole program ------------------------------------------------------------------
|
|
1144
|
+
|
|
1145
|
+
_SECTION_MAX = 16000
|
|
1146
|
+
|
|
1147
|
+
|
|
1148
|
+
def _clip(text: str) -> str:
|
|
1149
|
+
if len(text) <= _SECTION_MAX:
|
|
1150
|
+
return text
|
|
1151
|
+
half = _SECTION_MAX // 2
|
|
1152
|
+
return (text[:half] + f"\n[... {len(text) - _SECTION_MAX} characters "
|
|
1153
|
+
"omitted ...]\n" + text[-half:])
|
|
1154
|
+
|
|
1155
|
+
|
|
1156
|
+
@lru_cache(maxsize=None)
|
|
1157
|
+
def _rocm(tc: Toolchain) -> str | None:
|
|
1158
|
+
try:
|
|
1159
|
+
return loaded_rocm_version(tc)
|
|
1160
|
+
except (subprocess.CalledProcessError, OSError):
|
|
1161
|
+
return None
|
|
1162
|
+
|
|
1163
|
+
|
|
1164
|
+
def detect_thp() -> str:
|
|
1165
|
+
"""The kernel's transparent huge page mode ("always", "madvise",
|
|
1166
|
+
"never"), or "unknown"."""
|
|
1167
|
+
try:
|
|
1168
|
+
text = Path("/sys/kernel/mm/transparent_hugepage/enabled").read_text()
|
|
1169
|
+
except OSError:
|
|
1170
|
+
return "unknown"
|
|
1171
|
+
m = re.search(r"\[(\w+)\]", text)
|
|
1172
|
+
return m.group(1) if m else "unknown"
|
|
1173
|
+
|
|
1174
|
+
|
|
1175
|
+
def gpu_text() -> str:
|
|
1176
|
+
"""This node's GPU as recorded in a row: "<gfx> <name>"."""
|
|
1177
|
+
return " ".join(x for x in detect_gpu() if x)
|
|
1178
|
+
|
|
1179
|
+
|
|
1180
|
+
def wrong_arch(tc: Toolchain) -> str | None:
|
|
1181
|
+
"""The reason a toolchain cannot run on this node: its arch
|
|
1182
|
+
differs from the node's GPU; None when they match or the node's GPU is
|
|
1183
|
+
unknown (no rocminfo)."""
|
|
1184
|
+
gfx = detect_gpu()[0]
|
|
1185
|
+
if not gfx and tc.arch.startswith("sm_"):
|
|
1186
|
+
# Under OMP_TARGET_OFFLOAD=mandatory an NVHPC program on a
|
|
1187
|
+
# node with no visible GPU aborts with no message, and without it
|
|
1188
|
+
# runs on the host: that would read as a host fallback (GCC's
|
|
1189
|
+
# libgomp likewise: no device, so host fallback)
|
|
1190
|
+
return ("environment: no_gpu: toolchain {} needs an NVIDIA GPU "
|
|
1191
|
+
"and none is visible (nvidia-smi, CUDA_VISIBLE_DEVICES)"
|
|
1192
|
+
.format(tc.name))
|
|
1193
|
+
if gfx and gfx != tc.arch:
|
|
1194
|
+
return (f"environment: wrong_arch: toolchain {tc.name} targets "
|
|
1195
|
+
f"{tc.arch}, this node's GPU is {gfx}")
|
|
1196
|
+
return None
|
|
1197
|
+
|
|
1198
|
+
|
|
1199
|
+
def _spec_version(prog: Program) -> int:
|
|
1200
|
+
m = re.match(r"(?:omp|acc)(\d\d)-", prog.id)
|
|
1201
|
+
return int(m.group(1)) if m else 0
|
|
1202
|
+
|
|
1203
|
+
|
|
1204
|
+
# A C program that includes the math headers links the C math
|
|
1205
|
+
# library, as omp_vv's make.def does for every C test (offload.engine.baseline
|
|
1206
|
+
# C_EXTRA); on AMD GPUs -lm also selects the device math library.
|
|
1207
|
+
_LIBM = re.compile(r"^\s*#\s*include\s*<(?:math|complex|tgmath)\.h>", re.M)
|
|
1208
|
+
|
|
1209
|
+
|
|
1210
|
+
def with_libm(tc: Toolchain, prog: Program) -> Toolchain:
|
|
1211
|
+
"""`tc` with ``-lm`` for a C program that includes <math.h>,
|
|
1212
|
+
<complex.h> or <tgmath.h>; otherwise `tc` unchanged."""
|
|
1213
|
+
if prog.lang == "c" and _LIBM.search(prog.source) and \
|
|
1214
|
+
"-lm" not in tc.extra.split():
|
|
1215
|
+
return dataclasses.replace(tc, extra=f"{tc.extra} -lm".strip())
|
|
1216
|
+
return tc
|
|
1217
|
+
|
|
1218
|
+
|
|
1219
|
+
def _flags(tc: Toolchain, opt: str) -> str:
|
|
1220
|
+
return f"{tc.flags()} {opt}"
|
|
1221
|
+
|
|
1222
|
+
|
|
1223
|
+
def _provenance(tc: Toolchain, xnack: int, build_dir: str,
|
|
1224
|
+
flags: str, outcome: Outcome) -> dict:
|
|
1225
|
+
"""The provenance fields of a row (offload.engine.provenance)."""
|
|
1226
|
+
from offload.engine import provenance as PV
|
|
1227
|
+
try:
|
|
1228
|
+
env = dict(tc.run_env(xnack))
|
|
1229
|
+
except ValueError: # a mode the toolchain has not: no run
|
|
1230
|
+
env = dict(tc.env)
|
|
1231
|
+
env["OMP_TARGET_OFFLOAD"] = "unset" if tc.model == "acc" else \
|
|
1232
|
+
"mandatory"
|
|
1233
|
+
# a harness error says nothing about the program: never gated
|
|
1234
|
+
f = PV.fields(tc, build_dir, flags, env,
|
|
1235
|
+
outcome not in (Outcome.correct_on_device,
|
|
1236
|
+
Outcome.unobservable,
|
|
1237
|
+
Outcome.harness_error))
|
|
1238
|
+
f.pop("flags") # Result.flags is the row's own field
|
|
1239
|
+
return f
|
|
1240
|
+
|
|
1241
|
+
# Functions called with every failing Result (the reproduction
|
|
1242
|
+
# gate's hook, offload.engine.gate.hook: a campaign runner registers one to
|
|
1243
|
+
# queue its failures; nothing is registered by default)
|
|
1244
|
+
GATE_HOOKS: list = []
|
|
1245
|
+
|
|
1246
|
+
|
|
1247
|
+
def _gated(res: Result) -> Result:
|
|
1248
|
+
if res.gate == "pending":
|
|
1249
|
+
for hook in list(GATE_HOOKS):
|
|
1250
|
+
hook(res)
|
|
1251
|
+
return res
|
|
1252
|
+
|
|
1253
|
+
|
|
1254
|
+
def _build_dir(build_dir: str | Path | None) -> Path:
|
|
1255
|
+
"""The per-call build directory: a fresh mkdtemp ("harness_"), or
|
|
1256
|
+
(the reproduction gate's environments) the given path, which
|
|
1257
|
+
must not exist yet (it is created, with its parents, and removed after
|
|
1258
|
+
the call)."""
|
|
1259
|
+
if build_dir is None:
|
|
1260
|
+
return Path(tempfile.mkdtemp(prefix="harness_"))
|
|
1261
|
+
path = Path(build_dir)
|
|
1262
|
+
if path.exists():
|
|
1263
|
+
raise FileExistsError(f"build directory {path} exists")
|
|
1264
|
+
path.mkdir(parents=True)
|
|
1265
|
+
return path
|
|
1266
|
+
|
|
1267
|
+
|
|
1268
|
+
def run_program(prog: Program, tc: Toolchain, xnack: int, opt: str = "-O2",
|
|
1269
|
+
timeout_s: int = 300, repeats: int = 3, *,
|
|
1270
|
+
version: int | None = None, thp: str | None = None,
|
|
1271
|
+
compile_timeout_s: int = 900,
|
|
1272
|
+
build_dir: str | Path | None = None) -> Result:
|
|
1273
|
+
"""Compile `prog` with `tc`, run it under HSA_XNACK=`xnack` and classify
|
|
1274
|
+
the outcome (see the module docstring for the rules and policies).
|
|
1275
|
+
`build_dir`: build in this path instead of a fresh
|
|
1276
|
+
temporary directory (it must not exist; it is removed afterwards)."""
|
|
1277
|
+
return _gated(_run_program(prog, tc, xnack, opt, timeout_s, repeats,
|
|
1278
|
+
version, thp, compile_timeout_s, build_dir))
|
|
1279
|
+
|
|
1280
|
+
|
|
1281
|
+
def _run_program(prog: Program, tc: Toolchain, xnack: int, opt: str,
|
|
1282
|
+
timeout_s: int, repeats: int, version: int | None,
|
|
1283
|
+
thp: str | None, compile_timeout_s: int,
|
|
1284
|
+
build_dir: str | Path | None) -> Result:
|
|
1285
|
+
if tc.model != prog.model: # the program's model decides the flags
|
|
1286
|
+
tc = dataclasses.replace(tc, model=prog.model)
|
|
1287
|
+
lang = "c" if prog.lang == "c" else "f90"
|
|
1288
|
+
if tc.lang != lang: # and its language the compiler
|
|
1289
|
+
tc = dataclasses.replace(tc, lang=lang)
|
|
1290
|
+
tc = tc.for_mode(xnack) # NVHPC builds per memory mode
|
|
1291
|
+
tc = with_libm(tc, prog)
|
|
1292
|
+
base = dict(program_id=prog.id, primary_atom=prog.primary_atom,
|
|
1293
|
+
atoms=tuple(sorted(prog.atoms)), toolchain=tc.name,
|
|
1294
|
+
xnack=xnack, opt=opt, flags=_flags(tc, opt), rocm=_rocm(tc),
|
|
1295
|
+
device=device_of(tc), compiler=compiler_version(tc),
|
|
1296
|
+
needs=tuple(prog.needs), evidence=prog.evidence,
|
|
1297
|
+
observable=prog.observable, legal=prog.legal,
|
|
1298
|
+
violates=prog.violates,
|
|
1299
|
+
version=_spec_version(prog) if version is None else version,
|
|
1300
|
+
thp=detect_thp() if thp is None else thp, model=prog.model,
|
|
1301
|
+
lang=lang, scope=getattr(prog, "scope", "device"),
|
|
1302
|
+
machine=tc.machine, arch=tc.arch, gpu=gpu_text())
|
|
1303
|
+
bad_arch = wrong_arch(tc)
|
|
1304
|
+
if bad_arch:
|
|
1305
|
+
# not built: "-" as the build directory (provenance stays complete)
|
|
1306
|
+
return Result(outcome=Outcome.harness_error, reason=bad_arch,
|
|
1307
|
+
flaky=False, stdout="", stderr="", **base,
|
|
1308
|
+
**_provenance(tc, xnack, "-", base["flags"],
|
|
1309
|
+
Outcome.harness_error))
|
|
1310
|
+
tmp = _build_dir(build_dir)
|
|
1311
|
+
try:
|
|
1312
|
+
name = re.sub(r"[^A-Za-z0-9_.-]", "_", prog.id) or "prog"
|
|
1313
|
+
src = tmp / f"{name}.{'c' if lang == 'c' else 'f90'}"
|
|
1314
|
+
exe = tmp / f"{name}.out"
|
|
1315
|
+
src.write_text(prog.source)
|
|
1316
|
+
build = _execute(compile_script(tc, str(src), str(exe), opt,
|
|
1317
|
+
str(tmp)),
|
|
1318
|
+
tmp, compile_timeout_s, merge=True)
|
|
1319
|
+
clog = f"--- compile (rc={build.rc}) ---\n" + _clip(build.stdout)
|
|
1320
|
+
|
|
1321
|
+
def scrub(text: str) -> str:
|
|
1322
|
+
# the per-call directory name differs on every call; replace it
|
|
1323
|
+
# (absolute, and relative as CCE prints it) so results compare
|
|
1324
|
+
return text.replace(str(tmp), "<tmpdir>").replace(tmp.name,
|
|
1325
|
+
"<tmpdir>")
|
|
1326
|
+
|
|
1327
|
+
def result(outcome, reason, stdout="", stderr="", flaky=False):
|
|
1328
|
+
return Result(outcome=outcome, reason=scrub(reason), flaky=flaky,
|
|
1329
|
+
stdout=scrub(_clip(stdout)),
|
|
1330
|
+
stderr=scrub(clog + ("\n" + _clip(stderr) if stderr
|
|
1331
|
+
else "")), **base,
|
|
1332
|
+
**_provenance(tc, xnack, str(tmp), base["flags"],
|
|
1333
|
+
outcome))
|
|
1334
|
+
|
|
1335
|
+
if build.timed_out:
|
|
1336
|
+
return result(Outcome.harness_error, "compile_timeout")
|
|
1337
|
+
# compile-output probes
|
|
1338
|
+
if prog.expect in ("compile_message", "compile_error"):
|
|
1339
|
+
fatal = _diagnostic(tc, "error", prog.token, build.stdout)
|
|
1340
|
+
if build.rc != 0 and fatal:
|
|
1341
|
+
if prog.expect == "compile_error":
|
|
1342
|
+
return result(Outcome.correct_on_device,
|
|
1343
|
+
f"compile_error_termination: {fatal}")
|
|
1344
|
+
return result(Outcome.wrong_answer, "check_fail: compile-time "
|
|
1345
|
+
"error termination where severity(warning) "
|
|
1346
|
+
f"requires a warning: {fatal}")
|
|
1347
|
+
if build.rc == 0 and prog.expect == "compile_error":
|
|
1348
|
+
return result(Outcome.wrong_answer, "check_fail: no "
|
|
1349
|
+
"compile-time error termination (the "
|
|
1350
|
+
"compilation went on)")
|
|
1351
|
+
shown = _diagnostic(tc, "warning", prog.token, build.stdout)
|
|
1352
|
+
if build.rc == 0 and not shown:
|
|
1353
|
+
return result(Outcome.wrong_answer, "check_fail: no "
|
|
1354
|
+
"compile-time message with the token in the "
|
|
1355
|
+
"compiler output")
|
|
1356
|
+
if build.rc != 0:
|
|
1357
|
+
found = classify_message(tc.name, build.stdout,
|
|
1358
|
+
CATEGORY_ORDER[:-1], lang)
|
|
1359
|
+
if found is None:
|
|
1360
|
+
return result(Outcome.harness_error,
|
|
1361
|
+
f"unclassified_compile_failure: rc={build.rc}")
|
|
1362
|
+
cat, line = found
|
|
1363
|
+
msgs = scrub(messages_of(tc.name, build.stdout, lang))
|
|
1364
|
+
if cat == "environment":
|
|
1365
|
+
return dataclasses.replace(result(
|
|
1366
|
+
Outcome.harness_error, f"environment: {line}"),
|
|
1367
|
+
messages=msgs)
|
|
1368
|
+
return dataclasses.replace(result(
|
|
1369
|
+
Outcome.rejected, f"{CODES[cat]}: {line}"), messages=msgs)
|
|
1370
|
+
if not exe.is_file():
|
|
1371
|
+
return result(Outcome.harness_error,
|
|
1372
|
+
"no_executable: the compiler exited 0 but wrote "
|
|
1373
|
+
"no executable")
|
|
1374
|
+
notes = "".join(f"; note: {name}" for name, pat in
|
|
1375
|
+
NOTES.get(table_key(tc.name, lang), {}).items()
|
|
1376
|
+
if re.search(pat, build.stdout, re.M))
|
|
1377
|
+
if prog.expect == "error_termination":
|
|
1378
|
+
def trial(*a):
|
|
1379
|
+
return _error_trial(*a, source=prog.source)
|
|
1380
|
+
else:
|
|
1381
|
+
trial = _trial
|
|
1382
|
+
ignored = classify_message(tc.name, build.stdout, ("ignored",), lang)
|
|
1383
|
+
if ignored:
|
|
1384
|
+
t = trial(tc, exe, xnack, tmp, timeout_s)
|
|
1385
|
+
return result(Outcome.accepted_ignored,
|
|
1386
|
+
f"ignored: {ignored[1]}; run: {t.outcome}: "
|
|
1387
|
+
f"{t.reason}{notes}", t.stdout, t.stderr)
|
|
1388
|
+
trials: list[_Trial] = []
|
|
1389
|
+
for _ in range(max(1, repeats)):
|
|
1390
|
+
t = trial(tc, exe, xnack, tmp, timeout_s)
|
|
1391
|
+
trials.append(t)
|
|
1392
|
+
if "timeout" in t.reason or t.outcome == Outcome.harness_error:
|
|
1393
|
+
break
|
|
1394
|
+
worst = min(trials, key=lambda t: WORST_FIRST.index(t.outcome))
|
|
1395
|
+
flaky = len({(t.outcome, t.reason) for t in trials}) > 1
|
|
1396
|
+
outcome, reason = worst.outcome, worst.reason
|
|
1397
|
+
if outcome == Outcome.correct_on_device and not prog.observable:
|
|
1398
|
+
outcome = Outcome.unobservable
|
|
1399
|
+
reason += " (device kernel ran; the atom has no checked effect)"
|
|
1400
|
+
if flaky:
|
|
1401
|
+
reason += "; repeats: " + " | ".join(
|
|
1402
|
+
f"{t.outcome}: {t.reason}" for t in trials)
|
|
1403
|
+
if prog.expect == "compile_message":
|
|
1404
|
+
reason += "; compile message: " + _diagnostic(
|
|
1405
|
+
tc, "warning", prog.token, build.stdout)
|
|
1406
|
+
return result(outcome, reason + notes, worst.stdout, worst.stderr,
|
|
1407
|
+
flaky)
|
|
1408
|
+
finally:
|
|
1409
|
+
shutil.rmtree(tmp, ignore_errors=True)
|
|
1410
|
+
|
|
1411
|
+
|
|
1412
|
+
# --- programs from files, JSONL ----------------------------------------------------------
|
|
1413
|
+
|
|
1414
|
+
def program_from_file(path: str | Path, **overrides) -> Program:
|
|
1415
|
+
"""A Program for a hand-written source (e.g. a control) or a saved
|
|
1416
|
+
generated program. Fields come from the offload.engine.gen header comment
|
|
1417
|
+
when present (id, primary atom, legal, observable, evidence, needs,
|
|
1418
|
+
std), else defaults: id = file stem, primary_atom = "control.<stem>",
|
|
1419
|
+
legal and observable True, no needs, evidence "construct". `atoms` is
|
|
1420
|
+
{primary_atom}. Keyword arguments override any field."""
|
|
1421
|
+
path = Path(path)
|
|
1422
|
+
source = path.read_text()
|
|
1423
|
+
head: dict[str, str] = {}
|
|
1424
|
+
c_source = path.suffix == ".c"
|
|
1425
|
+
lead = "//" if c_source else "!"
|
|
1426
|
+
for line in source.splitlines():
|
|
1427
|
+
if not line.startswith(lead):
|
|
1428
|
+
break
|
|
1429
|
+
m = re.match(rf"{lead}\s*([a-z_ ]+):\s*(.*)$", line)
|
|
1430
|
+
if m:
|
|
1431
|
+
head.setdefault(m.group(1).strip(), m.group(2).strip())
|
|
1432
|
+
pid = head.get("id", path.stem)
|
|
1433
|
+
primary = head.get("primary atom", f"control.{path.stem}")
|
|
1434
|
+
legal_text = head.get("legal", "yes")
|
|
1435
|
+
vm = re.search(r"violates (\S+?)\)?$", legal_text)
|
|
1436
|
+
needs_text = head.get("needs", "none")
|
|
1437
|
+
fields = dict(
|
|
1438
|
+
id=pid, lang="c" if c_source else "fortran", source=source,
|
|
1439
|
+
atoms=frozenset({primary}),
|
|
1440
|
+
primary_atom=primary, legal=legal_text.startswith("yes"),
|
|
1441
|
+
violates=vm.group(1) if vm else None,
|
|
1442
|
+
observable=not head.get("observable", "yes").startswith("no"),
|
|
1443
|
+
std=head.get("std", "c11" if c_source else "f2008"),
|
|
1444
|
+
needs=() if needs_text == "none" else tuple(
|
|
1445
|
+
n.strip() for n in needs_text.split(",")),
|
|
1446
|
+
evidence=head.get("evidence", "construct"),
|
|
1447
|
+
expect=head.get("expect", "result").split()[0],
|
|
1448
|
+
token=head.get("token", ""),
|
|
1449
|
+
model="acc" if re.match(r"acc\d\d-", pid) else "omp")
|
|
1450
|
+
fields.update(overrides)
|
|
1451
|
+
return Program(**fields)
|
|
1452
|
+
|
|
1453
|
+
|
|
1454
|
+
def write_jsonl(results: Iterable[Result], path: Path) -> None:
|
|
1455
|
+
path = Path(path)
|
|
1456
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
1457
|
+
with path.open("w") as f:
|
|
1458
|
+
for r in results:
|
|
1459
|
+
f.write(json.dumps(dataclasses.asdict(r)) + "\n")
|
|
1460
|
+
|
|
1461
|
+
|
|
1462
|
+
def read_jsonl(path: Path) -> list[Result]:
|
|
1463
|
+
out = []
|
|
1464
|
+
for line in Path(path).read_text().splitlines():
|
|
1465
|
+
if not line.strip():
|
|
1466
|
+
continue
|
|
1467
|
+
d = json.loads(line)
|
|
1468
|
+
d["outcome"] = Outcome(d["outcome"])
|
|
1469
|
+
d["atoms"] = tuple(d["atoms"])
|
|
1470
|
+
d["needs"] = tuple(d["needs"])
|
|
1471
|
+
out.append(Result(**d))
|
|
1472
|
+
return out
|