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/om/admission/chip_enum.om # 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 / om / admission / chip_enum.om` 37 lines · 557 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 note enum: 0 table row identity, 1 raw sysfs vendor, 2 display class, 3 PCI field mask. 3 fn ce_eq a ulong b ulong to ulong 4 if eq a b 5 ret 1 6 end 7 ret 0 8 end 9 fn chip_enum mode ulong a ulong b ulong c ulong d ulong to ulong 10 if eq mode 0 11 ret and ce_eq a c ce_eq b d 12 end 13 if eq mode 1 14 ret ce_eq a 4318 15 end 16 if eq mode 2 17 ret ce_eq shr a 16 3 18 end 19 if eq mode 4 20 if eq c 0 21 ret 0 22 end 23 sa = shr a 63 24 sb = shr b 63 25 if ne sa sb 26 ret sa 27 end 28 if lt a b 29 ret 1 30 end 31 ret 0 32 end 33 if eq mode 5 34 ret ce_eq a 46 35 end 36 ret and a b 37 end