Showing posts with label ai. Show all posts
Showing posts with label ai. Show all posts

Tuesday, December 01, 2026

Orbital Data Centers Struggle Against Earth, but Musk Is Betting Anyway

The idea of putting AI data centers in orbit sounds like a sci-fi dream come true. Above Earth’s atmosphere, solar panels can soak up near-constant sunlight without taking up valuable land or draining local power grids. Elon Musk has gone so far as to claim that "the most economically compelling place to put compute will be space," backing that thesis through SpaceX’s partnership with NVIDIA to launch Vera Rubin AI supercomputers onto Starmind satellites.

Yet comparing the exact same number of servers on Earth versus in space, normalized to a standard one-megawatt cluster of roughly 1,000 high-end AI GPUs, reveals a much more complicated story. Over a five-year lifecycle, traditional engineering models show an orbital data center costing two-and-a-half to five times more than an identical facility on the ground, weighed down by the unforgiving realities of cooling and power in a vacuum. Understanding whether space compute is a brilliant workaround or an expensive dead end comes down to a clash between thermodynamics and terrestrial bottlenecks.

Physics of Cooling Without Air

Every watt of electricity that flows into a server eventually turns into heat. On Earth, getting rid of that heat is relatively straightforward because the planet is surrounded by an ocean of air and water. A modern, liquid-cooled data hall can pack a megawatt of servers into roughly ten to fifteen racks taking up less than one hundred square meters of floor space, relying on compact rooftop chillers or evaporative cooling towers to carry the thermal energy away into the atmosphere.

In the vacuum of space, there is no air for convection and no surrounding ground for conduction. Space acts like a giant thermos bottle, trapping heat inside a spacecraft unless it is actively radiated away as infrared light. Because silicon chips have to stay relatively cool to function properly, radiator panels operate at modest temperatures where each square meter of surface area can only shed about 500 to 665 watts of heat. To cool a single megawatt of servers, an orbital data center must unfold between 1,500 and 2,200 square meters of radiator wings (roughly the size of six to eight tennis courts) just to match what a small mechanical room accomplishes on Earth.

Mass and Power Penalty

Before those servers can generate heat, they need power. Even when a satellite is placed in a specialized dawn-dusk orbit where it stays in near-continuous sunlight, triple-junction space solar cells only convert about thirty percent of incoming solar energy into usable electricity. Generating a steady megawatt requires roughly 3,000 square meters of solar arrays. If the satellite orbits closer to the equator and passes through Earth’s shadow every ninety minutes, that solar array area has to double, and the spacecraft must carry roughly fourteen metric tons of batteries just to survive thirty-five minutes of darkness.

All of that power and cooling hardware creates a massive weight problem. A megawatt of bare server racks weighs around ten metric tons. Once engineers bolt on the deployable radiators, pumped fluid loops, solar wings, radiation shielding, and structural trusses needed to keep them alive in orbit, the total mass balloons to between thirty and fifty-nine metric tons. More than two-thirds of the payload launched into space is simply plumbing and power generation.

Side-by-Side Cost Reality

When industry analysts model the total five-year cost of running a one-megawatt compute cluster, the financial gap between orbit and Earth becomes stark. Even assuming aggressive next-generation launch pricing around five hundred dollars per kilogram, the baseline numbers heavily favor staying on the ground:

Metric (Per 1 MW Compute) Terrestrial Data Center Orbital Data Center (Dawn-Dusk LEO)
Compute Hardware (GPUs) ~$35M (10 tons) ~$35M+ (plus radiation-tolerant redundancy)
Facility / Bus & Launch CapEx ~$12M – $25M (building, grid, chillers) ~$25M – $50M+ (bus, solar, radiators, launch at $500/kg)
Cooling Overhead (PUE) ~1.09 – 1.20 (9%–20% extra power for fans/pumps) ~1.05 – 1.15 (pumped fluid loops), but 10–20 tons of radiator mass
Facility Lifespan 15 – 20 years (GPUs swapped every 4–5 yrs) 5 years (radiation degradation & orbital drag; entire satellite replaced)
Maintenance & Repair On-site technicians swap failed DIMMs/GPUs daily Zero maintenance (must launch spare GPUs upfront to offset ~9%/yr failure rate)
5-Year Total Cost (incl. GPUs & Power) ~$50M – $65M ~$85M – $160M+ (even with optimistic launch pricing)

Note: Cost and engineering estimates are synthesized from independent industry analyses, including Boston Consulting Group's Space-Based Data Centers Cost Outlook, SemiAnalysis's orbital compute modeling, and Andrew McCalip's open-source orbital economics model.

Five-Year Lifecycle and Unserviceable Hardware

Beyond launch weight, orbital data centers face structural inefficiencies that even cheap rockets struggle to erase. On Earth, a data center operator builds a concrete shell, electrical substation, and cooling plant once, then amortizes that infrastructure over fifteen to twenty years while swapping out servers every few years as newer chips hit the market. In low Earth orbit, cosmic radiation steadily degrades solar cells and electronics, while wisps of upper-atmosphere drag require constant propellant burns. Within about five years, the satellite reaches the end of its operational life, forcing the operator to deorbit the entire spacecraft and launch a brand-new power plant and cooling system from scratch.

Operating in orbit also means giving up the ability to fix broken parts. In a terrestrial cluster, memory sticks, power supplies, and GPUs fail regularly and get swapped out in minutes. In space, a dead GPU stays dead forever. Because hardware fails at roughly nine percent per year under orbital conditions, engineers have to launch fifteen to thirty percent more GPUs upfront just to guarantee that a full megawatt of compute is still working by year five. Add in the months of idle depreciation while chips wait on the ground for launch integration, along with the bandwidth limits of beaming data down via optical laser links instead of fiber, and the operational friction adds up quickly.

Musk’s Counterargument: The Grid Wall and Starship Economics

Given those numbers, why is Musk convinced space will win? His argument isn't that space has better thermal physics. Instead, it is a bet that terrestrial power grids will hit an insurmountable wall while SpaceX makes launch costs virtually free.

On Earth, building multi-gigawatt AI data centers increasingly runs into years-long electrical grid interconnection delays, local permitting battles, water shortages, and surging utility rates. In Musk’s view, if an AI company cannot get power on the ground within a two-to-three-year window, the true cost of staying on Earth isn't the electric bill. It is losing the AI race altogether. In a dawn-dusk orbit, a satellite gets continuous, uninterrupted solar energy without clouds, nighttime, or local zoning boards.

To make the hardware math work, SpaceX and NVIDIA are attacking the mass and cost penalties from two angles. First, through full and rapid reusability of Starship, Musk aims to push launch costs down from thousands of dollars per kilogram to between ten and one hundred dollars per kilogram, turning orbital deployment into something closer to commercial air freight. Second, rather than building bespoke aerospace satellites, SpaceX plans to stamp out standardized nodes for its FCC-approved Starmind constellation on an assembly line (similar to Starlink) carrying ultra-dense, co-designed Kyber Galaxy server racks that compress a 72-GPU Vera Rubin system into roughly a third of its normal physical volume.

The Verdict: Launch and Engineering Costs vs. Scarcity Costs

Ultimately, the debate over orbital data centers comes down to two competing kinds of cost: the direct expense of launching heavy hardware and overcoming hard thermodynamics versus the financial penalty of Earth's infrastructure bottlenecks. As long as power and land remain accessible on the ground, terrestrial data centers will remain vastly cheaper to build, cool, maintain, and upgrade. Space compute only becomes economically compelling if two things happen simultaneously: Starship slashes launch costs by an order of magnitude, and terrestrial power grids become so congested that waiting years for a grid connection costs more than launching a gigawatt of AI toward the sun.

Saturday, October 31, 2026

Navigating the Realities of AI Assurances

When stripping away the marketing gloss, deploying an AI model into production is fundamentally an exercise in risk management. As large language models occupy a larger footprint in corporate workflows, enterprise leaders are running into a sobering realization: these models are statistical probability engines, not databases of verified facts. A model does not "know" anything; it predicts the most plausible next token based on training patterns. This fluent, highly authoritative tone makes it incredibly easy to trust an output that might be completely detached from reality. For businesses automating customer service, legal document review, or financial analysis, this inherent unreliability isn’t just a technical quirk; it is a critical operational liability.

If one walks into an executive suite today, the golden question is no longer just about token latency or cluster utilization; it’s "How can an organization contractually or technically ensure this machine isn't lying?" While model providers are eager to sell the industry on their latest benchmarks, the actual legal and operational assurances they provide tell a completely different story. Let’s break down the realities, the architectural gaps, and what it actually takes to build a framework of trust around these models.

From a legal standpoint, model providers firmly shift the risk of bad outputs onto the customer. If one opens up the terms of service for almost any major provider, standard, ironclad clauses surface stating that the services are provided "as is" and "as available." Providers explicitly disclaim any liability regarding accuracy, completeness, or reliability. They state clearly that AI-generated text does not constitute professional advice, whether medical, legal, or financial. If a model hallucinates a false clause or a bad metric, and a business acts on it and loses millions, the liability caps in standard commercial terms are typically restricted to the amount paid for the service over a prior few months, or a baseline. Furthermore, labs frequently update weights and tune alignments under the hood without notification. This "performance drift" can cause established enterprise pipelines to suddenly break or degrade, leaving infrastructure teams with zero legal recourse.

Because a provider cannot be sued for a hallucination, trust must be engineered locally. This requires building an internal verification layer rather than relying on vendor API stability. A robust strategy involves implementing Retrieval-Augmented Generation (RAG) to decouple the model's parametric memory from factual data, forcing the system to pull context from audited, internal databases. Additionally, platform teams must deploy deterministic guardrails and programmatic validation layers (like Llama Guard or custom regex parsers) to scan outputs for anomalies, programmatic failures, or toxic text before the data ever reaches an end-user or an internal database.

Data Privacy and the Training Loop

The data fed into an AI model is often an organization's most sensitive intellectual property, containing everything from proprietary source code to protected health information (PHI). The primary risk here is data exfiltration into the provider's public training set. On free or standard consumer tiers, providers reserve the right to retain prompts, context windows, and outputs to train future iterations of their models. If an engineer pastes sensitive debugging logs or a financial analyst drops an unreleased earnings report into a standard web interface without explicitly opting out, that data becomes part of the global statistical matrix, waiting to be surfaced to a competitor down the line.

The mitigation strategy here depends entirely on changing the contract structure or the network architecture. Moving up to developer APIs or dedicated enterprise contracts shifts the terms entirely, as providers contractually guarantee that customer data is excluded from the training loop, fully encrypted at rest and in transit, and compliant with enterprise standards like SOC 2 or HIPAA. For absolute compliance, organizations are bypassing external APIs altogether. By pulling open-weights models down into isolated VPCs or on-premises GPU infrastructure, data never transits a third-party gateway, ensuring complete data sovereignty.

As generative models ingest massive, public datasets during their brute-force training phases, the risk of a model spitting out copyrighted text, proprietary code, or licensed imagery is a constant anxiety for corporate legal teams. If an AI model generates an output that inadvertently mirrors copyrighted work, and a company uses that output in a commercial product, the organization faces direct exposure to copyright infringement lawsuits. The model provider built the machine, but the deploying application is the entity publishing the infringing material out in the wild.

To combat this hesitation, major enterprise players have introduced intellectual property (IP) indemnification, often marketed as copyright commitments. Under these terms, the provider promises to step in, defend the customer in court, and cover the legal costs or damages resulting from a copyright lawsuit. However, this protection is not an unconditional shield. It only applies if the platform's built-in content filters and safety guardrails are actively utilized. If a user explicitly prompts a model to circumvent safety checks or purposefully tries to recreate a protected work, the indemnification drops instantly, and the legal burden falls squarely back on the corporate team.

Ascension of Third-Party AI Assurance

Because model providers refuse to back the actual performance of their software with financial guarantees, a massive gap has formed between enterprise risk tolerance and AI capability. Traditional enterprise software comes with clear service level agreements (SLAs) regarding availability and uptime, but generative AI lacks any standard SLA regarding output quality. If a system drifts, misinterprets user intent, or generates systemic errors over a weekend, there is no vendor help desk that will reimburse the business for the operational fallout.

To fill this vacuum, a brand new ecosystem of third party AI assurance and performance insurance has emerged. Specialized underwriting syndicates are now analyzing AI deployments and writing standalone liability policies that insure businesses against direct financial losses caused by model failures, systemic hallucinations, or unintended algorithmic bias. Concurrently, platform operators are deploying independent monitoring stacks that run parallel to inference engines. These tools continuously stress-test live traffic, tracking drift, measuring factual alignment against baseline datasets, and providing independent validation metrics that turn qualitative AI outputs into measurable, auditable engineering data.

At the end of the day, trusting an AI model isn't about hoping the technology gets smarter or waiting for vendors to accept liability. True operational resilience proves that evidence beats trust every single time. Until providers are willing to insure their own outputs, the burden of verification remains entirely an architectural and engineering challenge of the consumer.

Thursday, October 29, 2026

Two Workloads, One Silicon Budget

When stripping away the marketing gloss, an AI Factory is just an assembly line turning raw compute and power into mathematical weights. But inside that factory, a clear operational reality surfaces: infrastructure teams are dealing with two completely different animals in AI Training and AI Inference.

Training is the brute-force phase. A massive, uneducated neural network is fed terabytes of data over weeks on end. The primary goal here is throughput and convergence speed by getting the model to learn as fast as possible without the hardware stalling. Developing a custom model that understands a specific domain, proprietary code, or sensitive medical data requires training.

Inference is the real-world sprint. This is the model out in the wild, answering user queries, generating text tokens, or making split-second decisions. The goal completely flips: the objective is to minimize latency and keep the cost-per-token as low as humanly possible. This is essential because a model sitting on a disk does not generate value or solve problems; it must be actively served to users.

Historically, teams built separate silos for these jobs. But as hardware lead times stretch out and silicon costs skyrocket, leadership eventually walks into the server room and asks the golden question: "Why can't this organization just run both on the exact same cluster?"

It sounds excellent on paper. The cluster handles massive training runs at night or between major releases, and operators slice it up for real-time inference during peak user hours. Let's walk through what it actually takes to architect for both, and why trying to merge them on the same physical fabric turns into a dogfight over resources very quickly.

Architectural Split Personalities

The architectural blueprint of a shared cluster reveals a deep conflict across every layer of the stack, driven by the fundamentally split personalities of these two workloads. This tension begins at the compute layer. Training demands absolute homogeneity across a dense footprint of premium silicon, such as H100 or Blackwell accelerators. Because distributed training relies on perfectly synchronized execution loops, any minor compute skew, where one GPU finishes its calculation slightly later than its neighbor, causes the entire cluster to hitch, wasting millions of dollars in idle time. Inference, by contrast, operates on a flexible spectrum. While large language models can be served on top-tier chips, inference workloads are frequently deployed across mid-tier GPUs, specialized NPUs, standard CPUs, or even edge devices depending on the specific latency service-level agreements (SLAs) required by the application.

Moving down to the network layer, the data flow patterns diverge completely. Training clusters are optimized for massive East-West synchronization traffic, where GPUs continuously pass gradients back and forth using collective operations like AllReduce. This requires ultra-high bandwidth, lossless interconnects like InfiniBand or dedicated physical NVLink fabrics to handle the sheer volume of intra-cluster communication. Inference clusters invert this model entirely, prioritizing North-South client traffic. Because user requests are highly atomic and independent of one another, inference handles data streams using standard Layer 3 RoCEv2 Ethernet fabrics designed to route incoming public traffic down to individual, isolated worker nodes without the need for inter-node synchronization.

This divergence is equally severe when looking at memory bottlenecks and storage architectures. The memory profile of a training run is fixed and predictable, requiring massive VRAM capacity to simultaneously hold active model weights, gradients, and optimizer states. To keep these processors fed, the storage architecture relies on parallel file systems tuned for crushing sequential block throughput, ensuring the cluster can dump massive checkpoint files to disk quickly before the GPUs stall. Inference memory bandwidth, however, is intensely volatile and bound by dynamic Key-Value (KV) cache management during the token generation phase. To prevent long user context windows from choking the system, inference discards parallel file systems in favor of fast local NVMe storage, optimizing for ultra-low latency random access and memory extensions to handle aggressive KV cache offloading.

Finally, the utilization profiles dictate completely different geographic and deployment strategies. Training runs operate at continuous peak saturation, typically maintaining a relentless 85% to 95% utilization rate through rigorous batch-size tuning. Because training is latency-insensitive, operators can push these clusters out to remote, high-power regions where land, cooling, and electricity are cheapest. Inference represents the exact opposite reality, showing a highly volatile and elastic utilization profile that often hovers under 40% as it scales up and down to absorb real-time traffic bursts. Because round-trip time (RTT) directly impacts the user experience, inference cannot sit in a remote desert; it must be deployed out at the edge or in metropolitan cloud on-ramps as close to the target user populations as possible.

Architectural Comparison Matrix

Architectural Dimension AI Training Clusters AI Inference Clusters
Primary Goal Maximize Throughput & Convergence Speed Minimize Latency & Cost-per-Token
Compute Hardware Dense, Premium GPUs/TPUs; absolute homogeneity to avoid compute skew. Flexible Spectrum: Premium/mid-tier GPUs, specialized NPUs, standard CPUs, or Edge chips.
Network Fabric Ultra-High Bandwidth, Lossless Interconnects (InfiniBand/NVLink). Heavy East-West traffic. Commodity Layer 3 RoCEv2 Ethernet. Optimized for North-South client traffic.
Memory Focus High VRAM Capacity & Predictable Access (Weights, gradients, optimizer states). Dynamic KV Cache Management. Constrained by token generation bandwidth.
Storage Architecture Parallel File Systems optimized for high sequential block throughput (Fast Checkpointing). Fast Local NVMe Storage for ultra-low latency random access and KV cache offloading.
Placement & Power Remote, High-Power, Cheap Regions (Electricity and land cost optimization). Metropolitan & Edge Deployment (Latency-sensitive; close to user populations).
GPU Utilization Profile Continuous Peak Saturation (85–95% via batch size tuning). Highly Volatile / Elastic (Often under 40% due to real-time traffic bursts).
Agentic / Reasoning Impact Minimal effect; training remains a batch operation. High Impact. Long reasoning steps turn stateless calls into stateful sessions.

Shared Cluster Reality Where the Wheels Detach

Attempting to squeeze both workloads into a single shared cluster is an attempt to merge a predictable, high-throughput steamroller with an erratic, low-latency sports car. Operators will run into immediate technical walls:

The Blast Radius of a Training Checkpoint

Imagine an 8-node Blackwell training job running alongside a pool of inference containers serving live customers. The training job hits its interval and begins saving a multi-terabyte model checkpoint to the storage fabric. If storage paths aren't rigorously isolated, that massive sequential write will saturate the shared I/O pipes.

Suddenly, the inference containers, which need fast local or shared NVMe access to reload context or pull weights, experience a spike in random access latency. In the inference world, a 100ms spike means dropped requests and broken SLAs.

Network Congestion and the AllReduce Hammer

Training relies on synchronized network loops. When an AllReduce operation kicks off, it floods the fabric, demanding every drop of bandwidth to pass gradients across the nodes. If inference traffic shares that same physical network switch fabric without strict Quality of Service (QoS) or hardware-level partitioning, North-South client packets get queued behind training packets.

For inference, network jitter translates directly to inter-token latency. A user sits waiting as the LLM response stutters out one agonizing word at a time because a background training job is hogging the backplane.

The Memory Tug-of-War and Agentic Session Stateful-ness

The game gets even harder when factoring in modern agentic or reasoning workloads. Reasoning models do not just take a stateless prompt and spit out a quick answer; they engage in long, multi-step internal monologues. This shifts inference from stateless calls into highly stateful sessions.

These sessions require deep context reloading and session affinity. GPUs must keep massive KV caches alive in VRAM across long user interactions. If a cluster orchestrator tries to aggressively reclaim or shift VRAM allocation back to a training job during an inference traffic lull, it will wipe out those cached user sessions. The next time the agent takes a reasoning step, it faces a massive context reload penalty, completely destroying the real-time user experience.

Can Both Coexist?

The short answer is theoretically yes but trust is not an architecture; evidence and isolation are required.

If sharing the same silicon footprint is mandatory, an organization cannot simply throw Kubernetes or Slurm at the problem and hope the default schedulers figure it out. Architects must design absolute boundary lines across every architectural dimension:

  • Network: Operators must physically or logically isolate East-West training traffic (InfiniBand/NVLink) from North-South inference traffic (Ethernet), utilizing strict SR-IOV or hardware rate-limiting.
  • Compute: Schedulers need hard multi-instance GPU (MIG) partitioning or strict node-level isolation to ensure that an erratic inference spike does not cause compute skew on a training job, and conversely, that a training run does not starve an inference node's CPU/GPU worker threads.
  • Storage: Infrastructure teams must decouple sequential parallel file systems from local, low-latency NVMe cache layers so that a checkpoint dump never stomps on a live user's KV cache.

At the end of the day, running a unified cluster is a classic tradeoff between capital efficiency and operational sanity. It saves capital on hardware provisioning, but the price is paid in architectural complexity. Without building hard fences between the training beast and the inference sprint, they will pull each other down, leaving administrators with stalled training runs and users staring at timeouts.

Tuesday, October 20, 2026

Walking Through NVIDIA Attribution

When a GPU job dies in the middle of the night, the first question is almost never "what happened?" It is "whose problem is this?" Is the node bad and does it need to be pulled out of rotation, or did someone submit a job that asked for more memory than the GPU has? NVIDIA Attribution is a service built to answer that question. It starts with a described workload, hand it the evidence collected (log lines from the nodes the job ran on, for example), and it matches that evidence against a ruleset to produce a verdict: the root symptom, the outcome and the failure domain it belongs to.

In this post I am going to walk through a small end to end demo of Attribution running on a single virtual machine. We will build the Attribution Blueprint container image, push it to a registry, deploy it into a MicroK8s cluster, and then call the API by hand with a simulated failed PyTorch job. The failure here will be a CUDA out of memory error, which makes for a nice example because the right answer is that the user owns the problem and the hardware is fine. I should be upfront that the workload here is made up and so is the single log line. It is a way to see the moving pieces, not a real incident. With all that said let's get started together on our journey.

Build and Push the Blueprint Image

The first step is building the container image from the Attribution repository. The virtual machine is an arm64 system so I am passing --platform linux/arm64, and I am tagging the image for the registry that runs in my lab environment on port 5000. This is a multi-stage build. One stage uses a Node 22 image to compile the web dashboard frontend with pnpm and Vite, and the final stage is Python 3.14 on Debian trixie where uv installs the blueprint, the service app and the attribution library. The build also installs gcc just long enough to compile a few dependencies and then purges it again to keep the image small.

$ docker build --platform linux/arm64 -f blueprint/docker/Dockerfile -t registry.schmaustech.com:5000/attribution-blueprint-web:latest . [+] Building 1.4s (32/32) FINISHED docker:default => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 3.07kB 0.0s => resolve image config for docker-image://docker.io/docker/dockerfile:1.7 0.4s => CACHED docker-image://docker.io/docker/dockerfile:1.7@sha256:a57df69d0ea827fb7266491f2813635de6f17269be881f696fbfdf2d83dda33e 0.0s => [internal] load metadata for ghcr.io/astral-sh/uv:0.10.12 0.4s => [internal] load metadata for docker.io/library/node:22-bookworm-slim 0.6s => [internal] load metadata for docker.io/library/python:3.14.6-slim-trixie 0.7s => [internal] load build context 0.0s => => transferring context: 60.10kB 0.0s => [web-build 1/4] FROM docker.io/library/node:22-bookworm-slim@sha256:c3de60bf2f9dd0ac6370e6117950ff62d6e339527e7472301c9c78a017978392 0.0s => FROM ghcr.io/astral-sh/uv:0.10.12@sha256:72ab0aeb448090480ccabb99fb5f52b0dc3c71923bffb5e2e26517a1c27b7fec 0.0s => [stage-1 1/19] FROM docker.io/library/python:3.14.6-slim-trixie@sha256:7bec7ddcddeff7975d6ba9b4be7dd6f6b2f55e7491539145e2978f7f97ce9144 0.0s => CACHED [stage-1 2/19] COPY --from=ghcr.io/astral-sh/uv:0.10.12 /uv /uvx /bin/ 0.0s => CACHED [stage-1 3/19] WORKDIR /opt/blueprint 0.0s => CACHED [stage-1 4/19] COPY blueprint/pyproject.toml blueprint/uv.lock ./ 0.0s => CACHED [stage-1 5/19] COPY blueprint/src/ ./src/ 0.0s => CACHED [web-build 2/4] WORKDIR /frontend 0.0s => CACHED [web-build 3/4] COPY blueprint/src/attribution_blueprint/webui/frontend/ ./ 0.0s => CACHED [web-build 4/4] RUN corepack enable && pnpm install --frozen-lockfile && pnpm exec tsc -b && pnpm exec vite build --outDir dist 0.0s => CACHED [stage-1 6/19] COPY --from=web-build /frontend/dist ./src/attribution_blueprint/webui/static/ 0.0s => CACHED [stage-1 7/19] COPY service/service-app/nvidia_attribution_client/ /opt/service/service-app/nvidia_attribution_client/ 0.0s => CACHED [stage-1 8/19] RUN uv sync --extra web --no-dev --no-editable --frozen 0.0s => CACHED [stage-1 9/19] WORKDIR /opt/attribution-service 0.0s => CACHED [stage-1 10/19] COPY service/attribution-lib/ /opt/attribution-lib/ 0.0s => CACHED [stage-1 11/19] COPY service/service-app/pyproject.toml service/service-app/uv.lock ./ 0.0s => CACHED [stage-1 12/19] COPY service/service-app/_build_version.py ./ 0.0s => CACHED [stage-1 13/19] COPY service/service-app/README.md service/service-app/LICENSE ./ 0.0s => CACHED [stage-1 14/19] COPY service/service-app/app/ ./app/ 0.0s => CACHED [stage-1 15/19] COPY service/service-app/nvidia_attribution_client/ ./nvidia_attribution_client/ 0.0s => CACHED [stage-1 16/19] RUN apt-get update && apt-get install -y --no-install-recommends gcc libc6-dev && uv sync --no-dev --no-editable --frozen && apt-get purge -y --auto-remove gcc libc6-dev && rm -rf /var/lib/ap 0.0s => CACHED [stage-1 17/19] COPY blueprint/docker/start.sh /usr/local/bin/attribution-blueprint-start 0.0s => CACHED [stage-1 18/19] RUN chmod +x /usr/local/bin/attribution-blueprint-start 0.0s => CACHED [stage-1 19/19] WORKDIR /opt/blueprint 0.0s => exporting to image 0.0s => => exporting layers 0.0s => => writing image sha256:7417910ee0d5bc1d35e8030e63996939c804eff310e63c9209131f4cc443df96 0.0s => => naming to registry.schmaustech.com:5000/attribution-blueprint-web:latest

The above output we can observe almost every step says CACHED and the whole build finished in a little over a second. That is only because I had built this image before, so on a first run expect it to take considerably longer while the frontend and Python dependencies are pulled and built. At this point we have an image sitting in the local Docker image store, so let's push it to the registry so the cluster can pull it.

$ docker push registry.schmaustech.com:5000/attribution-blueprint-web:latest The push refers to repository [registry.schmaustech.com:5000/attribution-blueprint-web] 5f70bf18a086: Pushed b78e1eeee5c9: Pushed e5c73dd8dfa2: Pushed bd7bce39331b: Pushed 66a7a0b9edd3: Pushed 6a52fb04e724: Pushed 87fa1d674280: Pushed 199eb863db71: Pushed 9c5d441c4e95: Pushed fe962dda67f4: Pushed 56f16490e6f3: Pushed 5b91b81ea413: Pushed 740cf88824b2: Pushed 2a56874aabc8: Pushed a4a5b6e3a44e: Pushed d142ef99965e: Pushed c0c0660a42bc: Pushed 740399ee44b6: Pushed 5f35d866a418: Pushed 2e68013aee3d: Pushed 86d005034ff8: Pushed c01c35a040a2: Pushed local: digest: sha256:7c387a2c2750c7e780f9ce6d397c97ddc6193da287daf0827e69358753e84119 size: 4923

Twenty-two layers pushed and a digest at the bottom. If everything looks good we can move onto deploying it.

Deploy Attribution to Kubernetes

For the deployment I always prefer yaml manifests, so the following is a single file that holds everything Attribution needs. Let's look at it and then go through what each object does.

$ cat attribution-deployment.yaml apiVersion: v1 kind: Namespace metadata: name: attribution --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: attribution-data namespace: attribution spec: accessModes: - ReadWriteOnce storageClassName: local-path-persistent resources: requests: storage: 1Gi --- apiVersion: apps/v1 kind: Deployment metadata: name: attribution namespace: attribution spec: replicas: 1 strategy: type: Recreate selector: matchLabels: app: attribution template: metadata: labels: app: attribution spec: containers: - name: attribution image: registry.schmaustech.com:5000/attribution-blueprint-web:latest imagePullPolicy: Always env: - name: ATTRIBUTION_DB value: /data/attributions.db - name: ATTRIBUTION_SERVICE_PORT value: "8000" - name: ATTRIBUTION_WEB_PORT value: "8080" ports: - name: api containerPort: 8000 - name: web containerPort: 8080 startupProbe: httpGet: path: / port: web periodSeconds: 5 failureThreshold: 36 readinessProbe: httpGet: path: / port: web periodSeconds: 10 livenessProbe: httpGet: path: /v2/healthz port: api periodSeconds: 20 failureThreshold: 3 resources: requests: cpu: 100m memory: 256Mi limits: memory: 1Gi volumeMounts: - name: data mountPath: /data volumes: - name: data persistentVolumeClaim: claimName: attribution-data --- apiVersion: v1 kind: Service metadata: name: attribution namespace: attribution spec: type: NodePort selector: app: attribution ports: - name: web port: 8080 targetPort: web nodePort: 30080 - name: api port: 8000 targetPort: api

The file starts with an attribution namespace and a one gigabyte PersistentVolumeClaim named attribution-data. That claim is what holds the SQLite database the web dashboard reads from, and I am using the local-path-persistent storage class since this is a single node lab. The Deployment runs one replica and uses the Recreate strategy rather than a rolling update. Since the volume is ReadWriteOnce and SQLite does not like two writers, we want the old pod gone before the new one starts.

The container exposes two ports: 8000 for the Attribution API and 8080 for the web dashboard, and the environment variables point the database at /data/attributions.db on the mounted volume. The probes are worth a quick look. The startup and readiness probes hit the web UI on /, while the liveness probe hits /v2/healthz on the API port. The startup probe gives the pod up to three minutes (5 second period times 36 failures) to come up, which is plenty of time for the first start. Finally the Service is a NodePort, with the web UI pinned to 30080 and the API port left for Kubernetes to assign.

With the manifest ready we can create everything efficiently in one shot.

$ kubectl create -f attribution-deployment.yaml namespace/attribution created persistentvolumeclaim/attribution-data created deployment.apps/attribution created service/attribution created

Now let's see if the pod comes up. Below we are asking for the pods, the claim and the service all at once so we can confirm each piece.

$ kubectl -n attribution get pods,pvc,service -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES pod/attribution-75f57d76d9-rw592 1/1 Running 0 45s 10.1.174.232 gpu-node <none> <none> NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS VOLUMEATTRIBUTESCLASS AGE VOLUMEMODE persistentvolumeclaim/attribution-data Bound pvc-9e497dc7-2b0f-4cef-bb8e-e0d074241f75 1Gi RWO local-path-persistent <unset> 45s Filesystem NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR service/attribution NodePort 10.152.183.26 <none> 8080:30080/TCP,8000:30496/TCP 45s app=attribution

The pod is Running and 1/1 ready, the claim is Bound to a one gigabyte volume, and the service shows the web UI on 8080 mapped to node port 30080 and the API on 8000 mapped to node port 30496. We will use both of those node ports in a moment. A plain pod listing a bit later confirms it has stayed up with no restarts.

$ kubectl get pods -n attribution NAME READY STATUS RESTARTS AGE attribution-75f57d76d9-rw592 1/1 Running 0 74s

Validate the Service

Before sending any real requests I want to confirm both ports answer. We can verify this by calling the health endpoint on the API node port, using the IP address of the virtual machine.

$ curl --max-time 10 -fsS http://192.168.0.111:30496/v2/healthz null

A bare null looks odd, but it is what the health endpoint returns on success. What matters is that curl was run with -f, so it would have failed loudly on any HTTP error. Next up is the web dashboard, where I only care about the status code.

$ curl --max-time 10 -fsS -o /dev/null -w 'Web UI HTTP %{http_code}\n' http://192.168.0.111:30080/ Web UI HTTP 200

An HTTP 200 from the dashboard. At this point I feel pretty confident the deployment is healthy. To save some typing for the rest of the demo I am exporting the API address into a variable and calling the health endpoint once more through it.

$ export SVC="http://192.168.0.111:30496" $ curl --fail-with-body -sS "${SVC}/v2/healthz"

Create an Attributor and Submit an Observation

Now for the interesting part. Everything in the Attribution API hangs off an attributor, which is how I think about it: a record of one workload you want an answer about. To create one we POST to /v2/attributor with a description of the workload and some metadata about where it ran.

The workload here is a made up PyTorch job named curl-example, submitted through Kueue, that ran for thirty minutes on GPUs 0 and 1 of a node called node-a and ended in a FAILED status. The metadata identifies the cluster, the agent that reported it, a tenant and the ruleset to use, which is default. I am piping the response through jq to pull out just the attributor_id and store it in a variable called ATT so we can reuse it.

$ export ATT="$( curl --fail-with-body -sS \ -X POST \ -H 'Content-Type: application/json' \ "${SVC}/v2/attributor" \ --data-binary @- <<'JSON' | jq -er '.attributor_id' { "workload": { "id": "curl-example-001", "type": "kueue", "job_start_time": "2026-10-07T10:00:00Z", "job_end_time": "2026-10-07T10:30:00Z", "interest_start_time": "2026-10-07T10:00:00Z", "interest_end_time": "2026-10-07T10:30:00Z", "timezone": "UTC", "status": "FAILED", "nodes": { "node-a": [0, 1] }, "name": "curl-example", "username": "example-user", "framework": "pytorch" }, "metadata": { "cluster": "local-microk8s", "agent": "curl", "tenant": "example-tenant", "ruleset": "default" } } JSON )" $ 1094296642135612619

That large number at the bottom is the attributor ID. The attributor knows about the workload but it has not seen any evidence yet, so let's give it some. Evidence is submitted as an observation against the attributor. The observation has a context saying it came from an application log (applog), and a body that carries the log line along with the resource it came from. In this case that is a single line, [rank 0] RuntimeError: CUDA out of memory, from node-a. The body is itself a JSON string, which is why you see all of the escaped quotes.

$ curl --fail-with-body -sS \ -X POST \ -H 'Content-Type: application/json' \ "${SVC}/v2/attributor/${ATT}/observation" \ --data-binary @- <<'JSON' { "context": { "time_interval": { "start": null, "end": null }, "source": "applog" }, "body": "[{\"body\":\"[rank 0] RuntimeError: CUDA out of memory\",\"resources\":[{\"kind\":\"node\",\"hostname\":\"node-a\"}]}]" } JSON {"observation_id":-5460837407236178041,"model_type":"ObservationResponseV2"

The API hands back an observation ID, which tells us the line was accepted and recorded against our attributor.

Read the Verdict

With the evidence in place we can ask Attribution what it thinks happened.

$ curl --fail-with-body -sS "${SVC}/v2/attributor/${ATT}/attribution" | jq . { "verdict": { "root_symptom": { "symptom": "cudaError out of memory", "source": { "observation_id": -5460837407236178041, "source": "applog", "pos": 1, "line": "[rank 0] RuntimeError: CUDA out of memory", "rule": "cudaError out of memory", "time": null }, "catalog_id": "cudaerror-out-of-memory" }, "attribution_outcome": "Fail User", "detail": "Not Applicable", "terminal_states": [ "Fail" ], "failure_domains": [ "User" ], "cancellation_actors": [], "uncertainty_type": null }, "symptoms": { "cudaError out of memory": [ { "type": "NodeSource", "node": "node-a", "status": "bad", "source": { "observation_id": -5460837407236178041, "source": "applog", "pos": 1, "line": "[rank 0] RuntimeError: CUDA out of memory", "rule": "cudaError out of memory", "time": null } } ] }, "observation_context": [ -5460837407236178041 ], "collectors": { "nccl_version": "NA", "cuda_version": "NA", "watchdog_error_time": null, "watchdog_timeout_seconds": null, "runtime_args": "{}", "bad_pairs": "", "nvrx_straggler": {}, "megatron_straggler": {}, "xid_pci_mappings": "{}", "recovery_actions": "", "investigatory_actions": "" }, "model_type": "AttributionResponseV2" }

There is a lot in that response, so let's go through the parts that matter. The verdict is the answer. The root_symptom shows that the log line matched the rule cudaError out of memory, and it points back at the observation, the log source and the exact line that triggered it. The attribution_outcome is Fail User and the failure_domains list contains only User. In plain terms, Attribution is telling us this job failed because of something in the job itself and not because of the node it ran on. There is no reason to cordon node-a or open a hardware ticket for this one.

The symptoms section ties the symptom to the specific node and marks it bad, and the collectors section holds extra context that Attribution can gather for a job, such as NCCL and CUDA versions, watchdog timeouts and straggler data. Those are mostly NA or empty here since we only gave it one log line and there was no real job to collect from.

Save the Result to the Dashboard

This next part tripped me up a little at first, so it is worth calling out. The API calls we just made return the attribution result, but they do not populate the web dashboard's SQLite database. The Blueprint CLI normally handles that persistence. Since we are driving the API by hand with curl, I am going to do the same thing the CLI would do, in a few small steps.

First I save the workload definition to a file in /tmp. It is the same workload we posted earlier, just without the metadata block.

$ cat > /tmp/attribution-workload.json <<'JSON' { "workload": { "id": "curl-example-001", "type": "kueue", "job_start_time": "2026-10-07T10:00:00Z", "job_end_time": "2026-10-07T10:30:00Z", "interest_start_time": "2026-10-07T10:00:00Z", "interest_end_time": "2026-10-07T10:30:00Z", "timezone": "UTC", "status": "FAILED", "nodes": { "node-a": [0, 1] }, "name": "curl-example", "username": "example-user", "framework": "pytorch" } } JSON

Then I fetch the attribution result for our attributor and write it to a file.

$ export SVC="http://192.168.0.111:30496" $ curl --fail-with-body -sS "${SVC}/v2/attributor/${ATT}/attribution" -o attribution-result.json

With both pieces on disk, jq merges them into a single dashboard record that holds the workload and its result side by side.

$ jq -n --slurpfile request /tmp/attribution-workload.json --slurpfile result attribution-result.json '{workload: $request[0].workload, result: $result[0]}' > attribution-dashboard-record.json

The last step is writing that record into the database. I do this by running a short Python snippet inside the running Attribution pod with kubectl exec, so it uses the same code and the same /data/attributions.db file on the persistent volume that the dashboard reads. The snippet loads the record from standard input, checks that it really contains a verdict, builds the workload context the writer expects (ID, nodes, start and end times, workload type, state and so on), and uses the blueprint's SQLiteOutput writer to save it.

$ kubectl -n attribution exec -i deployment/attribution -- \ /opt/blueprint/.venv/bin/python -c ' import json import sys from datetime import datetime from attribution_blueprint.connectors.outputs.sqlite import SQLiteOutput from attribution_blueprint.result import enrich_attribution_result record = json.load(sys.stdin) w = record["workload"] result = record["result"] if not isinstance(result.get("verdict"), dict): raise ValueError("Input does not contain an attribution verdict") context = { "id": w["id"], "nodes": list(w["nodes"]), "start_time": datetime.fromisoformat(w["job_start_time"]), "end_time": datetime.fromisoformat(w["job_end_time"]), "timezone": w.get("timezone", "UTC"), "workload_type": w["type"], "state": w["status"], "name": w.get("name", ""), "user_name": w.get("username", ""), "workload_framework": w.get("framework", ""), } writer = SQLiteOutput("/data/attributions.db") try: writer.write(context, enrich_attribution_result(result, [])) finally: writer.close() print("Saved dashboard record:", w["id"]) ' < attribution-dashboard-record.json Saved dashboard record: curl-example-001

The pod confirms with Saved dashboard record: curl-example-001. At this point the record lives in the database the dashboard is reading from, so the failed job should now be visible in the web UI on node port 30080.

Clean Up

Since this was only a demo, the last step is deleting the attributor we created. A zero exit code tells us the delete went through.

$ curl --fail-with-body -sS -X DELETE "${SVC}/v2/attributor/${ATT}" $ echo $? 0

Summary

In this walkthrough we built the NVIDIA Attribution Blueprint image for arm64, pushed it to a local registry, and deployed it to MicroK8s with a namespace, a persistent volume, a single replica Deployment and a NodePort service. After validating the health endpoint and the web dashboard, we created an attributor for a simulated failed PyTorch job, submitted a CUDA out of memory log line as an observation, and asked for the verdict. Attribution traced the log line to a matching rule and concluded the failure belonged to the user and not the infrastructure. We finished by saving the result into the dashboard's SQLite database through the pod and cleaning up the attributor.

The part I like most is how small the contract is. A workload description plus a bit of evidence goes in, and a structured verdict with the rule, the line and the failure domain comes out. That is exactly what we want when you are trying to decide whether a failed job needs a user to fix their code or an operator to fix a node.

The Attribution project lives on GitHub if you want to try this yourself or dig into the rulesets: https://github.com/dsx-ai-factory/attribution

Hopefully this provides a clear example of how to deploy Attribution and walk a failed workload through to a verdict.

Tuesday, February 24, 2026

OpenShift Network Card Rail Mapping

The goal of this writeup is to provide a simple mechanism to map which GPUs are associated to which NICs on the same PCIe switch inside a physical system. This mapped information can then assist in generating a OpenShift MachineConfig that can identify one network card per GPU on the same PCI root complex and persistently name that network device a rail(some number) while marking any others as secondary. This is primarily for NVIDIA's Spectrum-X stack but could be used across any platform where GPU to NIC coherency is important in regards to configuration for OpenShift.

Why?

For optimal cluster performance and minimal latency, it’s essential to align each GPU with its nearest high-speed network card, ideally on the same NUMA node and PCIe root complex. This ensures that data traveling to and from each GPU takes the shortest, most efficient path, which is especially critical for GPUDirect RDMA and high-throughput AI/HPC workloads.

While there are tools that can provide pieces of this view all the commands have to be run manually and then its up to the user to fit it all together. Ideally there should be one solution that can provide all the details in a concise manner.

Hwloc

The Portable Hardware Locality (hwloc) software package provides a portable abstraction of the hierarchical topology of modern architectures, including NUMA memory nodes (DRAM, HBM, non-volatile memory, CXL, etc.), processor packages, shared caches, cores and simultaneous multithreading. It also gathers various system attributes such as cache and memory information as well as the locality of I/O devices such as network interfaces, InfiniBand HCAs or GPUs.  A sample image that it can generate is shown below.

Hwloc primarily aims at helping applications with gathering information about increasingly complex parallel computing platforms so as to exploit them accordingly and efficiently. For instance, two tasks that tightly cooperate should probably be placed onto cores sharing a cache. However, two independent memory-intensive tasks should better be spread out onto different processor packages so as to maximize their memory throughput.

However Hwloc does not ship in OpenShift today.  Further it does not generate UDEV rules, MachineConfigs and seems heavy handed for the task at hand.

Rail Mappings

The gpu-nic-rail-mapping script aims to provide a simple example to identify the GPU to NIC relationship and then generates the MachineConfig for OpenShift to ensure there is one rail per GPU marked. Below is an example run on a Dell 9680 (H200) system with the following devices in it:

  • 8 x H200 GPUs - Device ID 10de:2335
  • 14 x BF3 Cards - Device ID 15b3:a2dc
sh-5.1# ./gpu-nic-rail-mapping -g 10de:2335 -n 15b3:a2dc -u 70-persistent-net.rules -r worker GPU BusAddr NIC BusAddr PCIe Switch NIC Slot NIC Port UDEV Eth UDEV IB ==================================================================================================== 1b:00.0 18:00.0 15:01.0/16:00.0 40 1 eth_rail0 roce_rail0 1b:00.0 1a:00.0 15:01.0/16:00.0 42 1 eth_sec0 roce_sec0 3c:00.0 3a:00.0 37:01.0/38:00.0 41 1 eth_rail1 roce_rail1 4b:00.0 4d:00.0 48:01.0/49:00.0 38 1 eth_rail2 roce_rail2 5c:00.0 5d:00.0 59:01.0/5a:00.0 37 1 eth_rail3 roce_rail3 5c:00.0 5f:00.0 59:01.0/5a:00.0 39 1 eth_sec1 roce_sec1 5c:00.0 5f:00.1 59:01.0/5a:00.0 39 2 eth_sec2 roce_sec2 9a:00.0 9b:00.0 97:01.0/98:00.0 32 1 eth_rail4 roce_rail4 bb:00.0 ba:00.0 b7:01.0/b8:00.0 31 1 eth_rail5 roce_rail5 bb:00.0 bc:00.0 b7:01.0/b8:00.0 33 1 eth_sec3 roce_sec3 bb:00.0 bc:00.1 b7:01.0/b8:00.0 33 2 eth_sec4 roce_sec4 cd:00.0 ca:00.0 c7:01.0/c8:00.0 36 1 eth_rail6 roce_rail6 cd:00.0 cc:00.0 c7:01.0/c8:00.0 34 1 eth_sec5 roce_sec5 dc:00.0 db:00.0 d7:01.0/d8:00.0 35 1 eth_rail7 roce_rail7 Generated 99-machine-config-udev-network.yaml file for OpenShift

Here was the 70-persistent-net.rules file generated.

sh-5.1# cat 70-persistent-net.rules ACTION=="add", KERNELS=="0000:18:00.0", SUBSYSTEM=="net", NAME="eth_rail0" ACTION=="add", KERNELS=="0000:18:00.0", SUBSYSTEM=="infiniband", PROGRAM="rdma_rename %k NAME_FIXED roce_rail0" ACTION=="add", KERNELS=="0000:1a:00.0", SUBSYSTEM=="net", NAME="eth_sec0" ACTION=="add", KERNELS=="0000:1a:00.0", SUBSYSTEM=="infiniband", PROGRAM="rdma_rename %k NAME_FIXED roce_sec0" ACTION=="add", KERNELS=="0000:3a:00.0", SUBSYSTEM=="net", NAME="eth_rail1" ACTION=="add", KERNELS=="0000:3a:00.0", SUBSYSTEM=="infiniband", PROGRAM="rdma_rename %k NAME_FIXED roce_rail1" ACTION=="add", KERNELS=="0000:4d:00.0", SUBSYSTEM=="net", NAME="eth_rail2" ACTION=="add", KERNELS=="0000:4d:00.0", SUBSYSTEM=="infiniband", PROGRAM="rdma_rename %k NAME_FIXED roce_rail2" ACTION=="add", KERNELS=="0000:5d:00.0", SUBSYSTEM=="net", NAME="eth_rail3" ACTION=="add", KERNELS=="0000:5d:00.0", SUBSYSTEM=="infiniband", PROGRAM="rdma_rename %k NAME_FIXED roce_rail3" ACTION=="add", KERNELS=="0000:5f:00.0", SUBSYSTEM=="net", NAME="eth_sec1" ACTION=="add", KERNELS=="0000:5f:00.0", SUBSYSTEM=="infiniband", PROGRAM="rdma_rename %k NAME_FIXED roce_sec1" ACTION=="add", KERNELS=="0000:5f:00.1", SUBSYSTEM=="net", NAME="eth_sec2" ACTION=="add", KERNELS=="0000:5f:00.1", SUBSYSTEM=="infiniband", PROGRAM="rdma_rename %k NAME_FIXED roce_sec2" ACTION=="add", KERNELS=="0000:9b:00.0", SUBSYSTEM=="net", NAME="eth_rail4" ACTION=="add", KERNELS=="0000:9b:00.0", SUBSYSTEM=="infiniband", PROGRAM="rdma_rename %k NAME_FIXED roce_rail4" ACTION=="add", KERNELS=="0000:ba:00.0", SUBSYSTEM=="net", NAME="eth_rail5" ACTION=="add", KERNELS=="0000:ba:00.0", SUBSYSTEM=="infiniband", PROGRAM="rdma_rename %k NAME_FIXED roce_rail5" ACTION=="add", KERNELS=="0000:bc:00.0", SUBSYSTEM=="net", NAME="eth_sec3" ACTION=="add", KERNELS=="0000:bc:00.0", SUBSYSTEM=="infiniband", PROGRAM="rdma_rename %k NAME_FIXED roce_sec3" ACTION=="add", KERNELS=="0000:bc:00.1", SUBSYSTEM=="net", NAME="eth_sec4" ACTION=="add", KERNELS=="0000:bc:00.1", SUBSYSTEM=="infiniband", PROGRAM="rdma_rename %k NAME_FIXED roce_sec4" ACTION=="add", KERNELS=="0000:ca:00.0", SUBSYSTEM=="net", NAME="eth_rail6" ACTION=="add", KERNELS=="0000:ca:00.0", SUBSYSTEM=="infiniband", PROGRAM="rdma_rename %k NAME_FIXED roce_rail6" ACTION=="add", KERNELS=="0000:cc:00.0", SUBSYSTEM=="net", NAME="eth_sec5" ACTION=="add", KERNELS=="0000:cc:00.0", SUBSYSTEM=="infiniband", PROGRAM="rdma_rename %k NAME_FIXED roce_sec5" ACTION=="add", KERNELS=="0000:db:00.0", SUBSYSTEM=="net", NAME="eth_rail7" ACTION=="add", KERNELS=="0000:db:00.0", SUBSYSTEM=="infiniband", PROGRAM="rdma_rename %k NAME_FIXED roce_rail7"

And finally the OpenShift MachineConfig 99-machine-config-udev-network.yaml for the udev rule naming.

sh-5.1# cat 99-machine-config-udev-network.yaml apiVersion: machineconfiguration.openshift.io/v1 kind: MachineConfig metadata: labels: machineconfiguration.openshift.io/role: worker name: 99-machine-config-udev-network spec: config: ignition: version: 3.2.0 storage: files: - contents: source: data:text/plain;charset=utf-8;base64,QUNUSU9OPT0iYWRkIiwgS0VSTkVMUz09IjAwMDA6MTg6MDAuMCIsIFNVQlNZU1RFTT09Im5ldCIsIE5BTUU9ImV0aF9yYWlsMCIKQUNUSU9OPT0iYWRkIiwgS0VSTkVMUz09IjAwMDA6MTg6MDAuMCIsIFNVQlNZU1RFTT09ImluZmluaWJhbmQiLCBQUk9HUkFNPSJyZG1hX3JlbmFtZSAlayBOQU1FX0ZJWEVEIHJvY2VfcmFpbDAiCkFDVElPTj09ImFkZCIsIEtFUk5FTFM9PSIwMDAwOjFhOjAwLjAiLCBTVUJTWVNURU09PSJuZXQiLCBOQU1FPSJldGhfc2VjMCIKQUNUSU9OPT0iYWRkIiwgS0VSTkVMUz09IjAwMDA6MWE6MDAuMCIsIFNVQlNZU1RFTT09ImluZmluaWJhbmQiLCBQUk9HUkFNPSJyZG1hX3JlbmFtZSAlayBOQU1FX0ZJWEVEIHJvY2Vfc2VjMCIKQUNUSU9OPT0iYWRkIiwgS0VSTkVMUz09IjAwMDA6M2E6MDAuMCIsIFNVQlNZU1RFTT09Im5ldCIsIE5BTUU9ImV0aF9yYWlsMSIKQUNUSU9OPT0iYWRkIiwgS0VSTkVMUz09IjAwMDA6M2E6MDAuMCIsIFNVQlNZU1RFTT09ImluZmluaWJhbmQiLCBQUk9HUkFNPSJyZG1hX3JlbmFtZSAlayBOQU1FX0ZJWEVEIHJvY2VfcmFpbDEiCkFDVElPTj09ImFkZCIsIEtFUk5FTFM9PSIwMDAwOjRkOjAwLjAiLCBTVUJTWVNURU09PSJuZXQiLCBOQU1FPSJldGhfcmFpbDIiCkFDVElPTj09ImFkZCIsIEtFUk5FTFM9PSIwMDAwOjRkOjAwLjAiLCBTVUJTWVNURU09PSJpbmZpbmliYW5kIiwgUFJPR1JBTT0icmRtYV9yZW5hbWUgJWsgTkFNRV9GSVhFRCByb2NlX3JhaWwyIgpBQ1RJT049PSJhZGQiLCBLRVJORUxTPT0iMDAwMDo1ZDowMC4wIiwgU1VCU1lTVEVNPT0ibmV0IiwgTkFNRT0iZXRoX3JhaWwzIgpBQ1RJT049PSJhZGQiLCBLRVJORUxTPT0iMDAwMDo1ZDowMC4wIiwgU1VCU1lTVEVNPT0iaW5maW5pYmFuZCIsIFBST0dSQU09InJkbWFfcmVuYW1lICVrIE5BTUVfRklYRUQgcm9jZV9yYWlsMyIKQUNUSU9OPT0iYWRkIiwgS0VSTkVMUz09IjAwMDA6NWY6MDAuMCIsIFNVQlNZU1RFTT09Im5ldCIsIE5BTUU9ImV0aF9zZWMxIgpBQ1RJT049PSJhZGQiLCBLRVJORUxTPT0iMDAwMDo1ZjowMC4wIiwgU1VCU1lTVEVNPT0iaW5maW5pYmFuZCIsIFBST0dSQU09InJkbWFfcmVuYW1lICVrIE5BTUVfRklYRUQgcm9jZV9zZWMxIgpBQ1RJT049PSJhZGQiLCBLRVJORUxTPT0iMDAwMDo1ZjowMC4xIiwgU1VCU1lTVEVNPT0ibmV0IiwgTkFNRT0iZXRoX3NlYzIiCkFDVElPTj09ImFkZCIsIEtFUk5FTFM9PSIwMDAwOjVmOjAwLjEiLCBTVUJTWVNURU09PSJpbmZpbmliYW5kIiwgUFJPR1JBTT0icmRtYV9yZW5hbWUgJWsgTkFNRV9GSVhFRCByb2NlX3NlYzIiCkFDVElPTj09ImFkZCIsIEtFUk5FTFM9PSIwMDAwOjliOjAwLjAiLCBTVUJTWVNURU09PSJuZXQiLCBOQU1FPSJldGhfcmFpbDQiCkFDVElPTj09ImFkZCIsIEtFUk5FTFM9PSIwMDAwOjliOjAwLjAiLCBTVUJTWVNURU09PSJpbmZpbmliYW5kIiwgUFJPR1JBTT0icmRtYV9yZW5hbWUgJWsgTkFNRV9GSVhFRCByb2NlX3JhaWw0IgpBQ1RJT049PSJhZGQiLCBLRVJORUxTPT0iMDAwMDpiYTowMC4wIiwgU1VCU1lTVEVNPT0ibmV0IiwgTkFNRT0iZXRoX3JhaWw1IgpBQ1RJT049PSJhZGQiLCBLRVJORUxTPT0iMDAwMDpiYTowMC4wIiwgU1VCU1lTVEVNPT0iaW5maW5pYmFuZCIsIFBST0dSQU09InJkbWFfcmVuYW1lICVrIE5BTUVfRklYRUQgcm9jZV9yYWlsNSIKQUNUSU9OPT0iYWRkIiwgS0VSTkVMUz09IjAwMDA6YmM6MDAuMCIsIFNVQlNZU1RFTT09Im5ldCIsIE5BTUU9ImV0aF9zZWMzIgpBQ1RJT049PSJhZGQiLCBLRVJORUxTPT0iMDAwMDpiYzowMC4wIiwgU1VCU1lTVEVNPT0iaW5maW5pYmFuZCIsIFBST0dSQU09InJkbWFfcmVuYW1lICVrIE5BTUVfRklYRUQgcm9jZV9zZWMzIgpBQ1RJT049PSJhZGQiLCBLRVJORUxTPT0iMDAwMDpiYzowMC4xIiwgU1VCU1lTVEVNPT0ibmV0IiwgTkFNRT0iZXRoX3NlYzQiCkFDVElPTj09ImFkZCIsIEtFUk5FTFM9PSIwMDAwOmJjOjAwLjEiLCBTVUJTWVNURU09PSJpbmZpbmliYW5kIiwgUFJPR1JBTT0icmRtYV9yZW5hbWUgJWsgTkFNRV9GSVhFRCByb2NlX3NlYzQiCkFDVElPTj09ImFkZCIsIEtFUk5FTFM9PSIwMDAwOmNhOjAwLjAiLCBTVUJTWVNURU09PSJuZXQiLCBOQU1FPSJldGhfcmFpbDYiCkFDVElPTj09ImFkZCIsIEtFUk5FTFM9PSIwMDAwOmNhOjAwLjAiLCBTVUJTWVNURU09PSJpbmZpbmliYW5kIiwgUFJPR1JBTT0icmRtYV9yZW5hbWUgJWsgTkFNRV9GSVhFRCByb2NlX3JhaWw2IgpBQ1RJT049PSJhZGQiLCBLRVJORUxTPT0iMDAwMDpjYzowMC4wIiwgU1VCU1lTVEVNPT0ibmV0IiwgTkFNRT0iZXRoX3NlYzUiCkFDVElPTj09ImFkZCIsIEtFUk5FTFM9PSIwMDAwOmNjOjAwLjAiLCBTVUJTWVNURU09PSJpbmZpbmliYW5kIiwgUFJPR1JBTT0icmRtYV9yZW5hbWUgJWsgTkFNRV9GSVhFRCByb2NlX3NlYzUiCkFDVElPTj09ImFkZCIsIEtFUk5FTFM9PSIwMDAwOmRiOjAwLjAiLCBTVUJTWVNURU09PSJuZXQiLCBOQU1FPSJldGhfcmFpbDciCkFDVElPTj09ImFkZCIsIEtFUk5FTFM9PSIwMDAwOmRiOjAwLjAiLCBTVUJTWVNURU09PSJpbmZpbmliYW5kIiwgUFJPR1JBTT0icmRtYV9yZW5hbWUgJWsgTkFNRV9GSVhFRCByb2NlX3JhaWw3Igo= filesystem: root mode: 420 path: /etc/udev/rules.d/70-persistent-net.rules

The above MachineConfig can now be applied on the worker nodes of an OpenShift cluster of homogeneous nodes and persistently name the the rail devices mapped to the according GPUs.

In this next example we tried this on an SuperMicro AMD Instinct type system which had the following devices in it:

  • 8 x MI325X - Device ID 1002:74a5
  • 7 x AMD Pensando Systems POLLARA-1Q400 100/200/400G 1-port Card - Device ID 1dd8:1002
  • 1 x NVIDIA ConnectX-7 - Device ID 15b3:1021

This system was interesting because it had multiple network card types associated with GPUs which allowed us to test the script behavior in that scenario.   One caveat on this system was that dmidecode and lspci both failed to show the physical slot number for the Pollara cards while the CX7 card showed its physical slot just fine.

# ./gpu-nic-rail-mapping -g 1002:74a5 -n 1dd8:1002,15b3:1021 -u 70-persistent-net.rules -r worker GPU BusAddr NIC BusAddr PCIe Switch NIC Slot NIC Port UDEV Eth UDEV IB ==================================================================================================== 05:00.0 09:00.0 00:01.1/01:00.0 NA 1 eth_rail0 roce_rail0 15:00.0 19:00.0 10:01.1/11:00.0 NA 1 eth_rail1 roce_rail1 65:00.0 69:00.0 60:01.1/61:00.0 NA 1 eth_rail2 roce_rail2 75:00.0 79:00.0 70:01.1/71:00.0 NA 1 eth_rail3 roce_rail3 85:00.0 89:00.0 80:01.1/81:00.0 NA 1 eth_rail4 roce_rail4 95:00.0 99:00.0 90:01.1/91:00.0 NA 1 eth_rail5 roce_rail5 e5:00.0 e6:00.0 e0:01.1/e1:00.0 1 1 eth_rail6 roce_rail6 f5:00.0 f9:00.0 f0:01.1/f1:00.0 NA 1 eth_rail7 roce_rail7 Generated 99-machine-config-udev-network.yaml file for OpenShift

Whilst a 70-persistent-net.rules file and 99-machine-config-udev-network.yaml machineconfig were generated here as well they look very much like the H200 example.

The overall idea here was to automate an otherwise tedious task when it came to identifying and mapping the same GPU and network devices on the same pcie root complex.   Hopefully this provided a simple example to accomplish that task.  For those interested in seeing the script the repository is here.