This directory contains snapshots of /sys/devices/system/ from various machines, used to test the sysfs topology implementation without requiring physical hardware access.
Each snapshot is a single plain-text manifest, <name>.sysfs.txt, with one relative/path=content line per sysfs file (plus # comments). Consumers regenerate the sysfs-shaped directory tree via capture_sysfs.sh --expand.
Synthesized topologies; each manifest's header comments describe the machine shape and the failure mode it guards against.
Hardware: AMD Ryzen 9 7950X (captured). 16 cores / 32 SMT threads with non-adjacent sibling pairs (cpuN + cpuN+16), two 8-core CCDs with private 32M L3 each, one NUMA node, and cluster_id reporting the 65535 sentinel on every cpu.
Hardware: Google Pixel 6 (Google Tensor GS101) Architecture: ARM64 Configuration:
Expected Behavior:
/sys/devices/system/node/, and is NOT taken from the cluster_id L2 domains. A machine with no node hierarchy is simply one node. Big/LITTLE selection is expressed through the performance level, not by splitting the machine into per-cluster nodes.Use the capture_sysfs.sh script to create snapshot manifests from real systems:
# Capture current system to a manifest ./capture_sysfs.sh my_system_name.sysfs.txt # Capture with automatic timestamped name ./capture_sysfs.sh # Expand a manifest back into a sysfs-shaped directory tree (for tools) ./capture_sysfs.sh --expand my_system_name.sysfs.txt /tmp/my_system_name
The script captures the sysfs topology:
cpu/present, cpu/kernel_max fallback)node/online, node/node<N>/cpulist) — the primary source of node identity; on SNC/NPS machines this is what shows one socket as several nodescore_id, physical_package_id, cluster_id, core_cpus_list, thread_siblings_list)type, level, size, shared_cpu_list)cpu_capacity for big.LITTLE detection)The script keeps thread_siblings_list because pre-5.3 kernels don't expose core_cpus_list; when a capture contains both, the thread_siblings_list lines are redundant (the backend prefers core_cpus_list).
See iree_sysfs_set_root_path, --task_topology_snapshot, iree_sysfs_host_matches_root.
cd runtime/src/iree/task/testdata/sysfs ./capture_sysfs.sh --expand arm64_pixel6_tensor.sysfs.txt /tmp/pixel6 cd - SNAP=/tmp/pixel6 # Test ARM64 big.LITTLE with default settings (all cores, scatter distribution) ./build/tools/iree-run-module \ --task_topology_snapshot=$SNAP --dump_task_topologies # Test ARM64 big.LITTLE with HIGH performance cores only ./build/tools/iree-run-module --task_topology_snapshot=$SNAP \ --task_topology_performance_level=high \ --dump_task_topologies # Test ARM64 with compact distribution (fill cache domains sequentially) ./build/tools/iree-run-module --task_topology_snapshot=$SNAP \ --task_topology_distribution=compact \ --dump_task_topologies # Test ARM64 with latency preset (compact + high performance) ./build/tools/iree-run-module --task_topology_snapshot=$SNAP \ --task_topology_favor=latency \ --dump_task_topologies # Test ARM64 with only LITTLE cores (low power) ./build/tools/iree-run-module --task_topology_snapshot=$SNAP \ --task_topology_performance_level=low \ --dump_task_topologies
Available flags for topology configuration:
--task_topology_snapshot: path to a snapshot directory--task_topology_performance_level: any, low (or efficiency), high (or performance)--task_topology_distribution: compact, scatter--task_topology_favor: latency, throughput, efficiency (overrides above flags)--task_topology_nodes: current, all, numa, or comma-separated NUMA node IDs (e.g., 0,2)When testing, verify:
cluster_id (see the node identity note above)Good candidates for test data to capture locally (but only check in small/unusual ones):
When adding new test data:
capture_sysfs.sh <name>.sysfs.txt on the target hardwaremanifests of //runtime/src/iree/task/testdata/sysfs:expanded_sysfs_snapshots in BUILD.bazel and mirror it in cmake.