MCPcopy Create free account
hub / github.com/Niko1221/Strata / card_bdf

Function card_bdf

engine/src/split/src/model.cpp:53–61  ·  view source on GitHub ↗

a card's PCI address in sysfs's spelling

Source from the content-addressed store, hash-verified

51#if !FNX_HOSTRING && !defined(_WIN32)
52// a card's PCI address in sysfs's spelling
53std::string card_bdf(int dev) {
54 char bus[32];
55 ck(cudaDeviceGetPCIBusId(bus, sizeof bus, dev), "cudaDeviceGetPCIBusId");
56 try {
57 return sysfs_bdf(bus);
58 } catch (const std::exception& e) {
59 throw std::runtime_error("card " + std::to_string(dev) + ": " + e.what());
60 }
61}
62// the ring stores straight into the next card's memory: with translated IOMMU domains every such write faults
63// (dmesg: "DMAR: ... PTE Write access is not set") and the first window ends in a ring timeout that names nothing.
64// Each card's IOMMU group must be identity (boot with iommu=pt); a card whose iommu_group link is absent has no IOMMU

Callers 1

check_cardsFunction · 0.85

Calls 3

sysfs_bdfFunction · 0.85
ckFunction · 0.70
to_stringFunction · 0.50

Tested by

no test coverage detected