Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/CUDApp/blob/main/evidence/chip-enum-policy-20261106/oracle.gcov # CUDApp CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `CUDApp / evidence / chip-enum-policy-20261106 / oracle.gcov` 60 lines · 2964 bytes Raw Blame History 1 -: 0:Source:~/work/cudastack/lanes/ToolsChip/tests/chip_enum_oracle.c 2 -: 0:Graph:~/work/cudastack/lanes/ToolsChip/build/chip-enum/om-chip_enum_oracle.gcno 3 -: 0:Data:~/work/cudastack/lanes/ToolsChip/build/chip-enum/om-chip_enum_oracle.gcda 4 -: 0:Runs:4 5 -: 1:/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ 6 -: 2:#define CUDAPP_MIGRATION_PENDING_C_CHIP_ENUM_POLICY 1 7 -: 3:#include "omega_chip_enum.h" 8 function oracle_enum called 460713 returned 100% blocks executed 100% 9 460713: 4:uint64_t oracle_enum(uint64_t m, uint64_t a, uint64_t b, uint64_t c, uint64_t d) { 10 460713: 5: return omega_chip_enum_decide(m, a, b, c, d); 11 call 0 returned 460713 12 -: 6:} 13 -: 0:Source:src/omega_chip_enum.h 14 -: 0:Graph:~/work/cudastack/lanes/ToolsChip/build/chip-enum/om-chip_enum_oracle.gcno 15 -: 0:Data:~/work/cudastack/lanes/ToolsChip/build/chip-enum/om-chip_enum_oracle.gcda 16 -: 0:Runs:4 17 -: 1:/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ 18 -: 2:#ifndef OMEGA_CHIP_ENUM_H 19 -: 3:#define OMEGA_CHIP_ENUM_H 20 -: 4:#include "cudapp_native.h" 21 -: 5:#include "omega_gpu_chip.h" 22 -: 6:#include 23 -: 7:#ifndef CUDAPP_MIGRATION_PENDING_C_CHIP_ENUM_POLICY 24 -: 8:#define CUDAPP_MIGRATION_PENDING_C_CHIP_ENUM_POLICY 0 25 -: 9:#endif 26 -: 10:/* Modes: row identity, raw vendor, display class, field mask, output slot, dot entry. */ 27 function omega_chip_enum_decide called 460713 returned 100% blocks executed 100% 28 460713: 11:static inline uint64_t omega_chip_enum_decide(uint64_t mode, uint64_t a, uint64_t b, uint64_t c, uint64_t d) { 29 -: 12:#if CUDAPP_MIGRATION_PENDING_C_CHIP_ENUM_POLICY 30 460713: 13: if (mode == 0) return a == c && b == d; 31 branch 0 taken 131073 (fallthrough) 32 branch 1 taken 329640 33 branch 2 taken 65537 (fallthrough) 34 branch 3 taken 65536 35 branch 4 taken 2 (fallthrough) 36 branch 5 taken 65535 37 329640: 14: if (mode == 1) return a == OMEGA_GPU_PCI_VENDOR_NVIDIA; 38 branch 0 taken 65553 (fallthrough) 39 branch 1 taken 264087 40 264087: 15: if (mode == 2) return (a >> 16) == 0x03u; 41 branch 0 taken 1041 (fallthrough) 42 branch 1 taken 263046 43 263046: 16: if (mode == 4) return (int64_t)a < (int64_t)b && c; 44 branch 0 taken 578 (fallthrough) 45 branch 1 taken 262468 46 branch 2 taken 272 (fallthrough) 47 branch 3 taken 306 48 branch 4 taken 136 (fallthrough) 49 branch 5 taken 136 50 262468: 17: if (mode == 5) return a == '.'; 51 branch 0 taken 256 (fallthrough) 52 branch 1 taken 262212 53 262212: 18: return a & b; 54 -: 19:#else 55 -: 20: uint64_t result; 56 -: 21: if (omega_chip_enum(&result, mode, a, b, c, d) != OMEGA_OK) abort(); 57 -: 22: return result; 58 -: 23:#endif 59 -: 24:} 60 -: 25:#endif