Repository navigation
Conversation
Add objects describing metadata and compilation data to T4 results json schema
Also fix the bug in pattern for version, dots need to be escaped
|
Hi Jana, thank you for your contribution! I think these are great additions. I agree this would definitely warrant a 1.1.0 version. A couple of remarks regarding the
Regarding
Regarding
This is great work that further enhances the standard, so let's keep the discussion going. |
Restructure existing metadata fields into three semantic categories: - compute: API, platform, device (compute_api renamed to api) - framework: autotuner, version, backend (shortened field names) - session: timestamp, timeunit (explicit ISO 8601 format) Group by purpose instead of keeping one flat bag of keys, so a reader can tell at a glance which part of a run a field describes. The flat layout was already getting hard to follow and we are about to add a lot more metadata on top of it. Note that metadata.timeunit moves to metadata.session.timeunit, and that key is read in production. The readers are updated later in this branch. All fields remain optional. No functional changes, just cleaner organization.
Add vendor-neutral accelerators array supporting NVIDIA, AMD, Intel, and future GPU vendors without schema updates. Each entry contains: - vendor: string identifier (nvidia, amd, intel, etc.) - tool: optional query tool name (nvidia-smi, rocm-smi, etc.) - data: raw tool output as JSON object Model this as an array rather than vendor-named fields so a host with two different accelerators, or a vendor we have not heard of yet, needs no schema change. Keep data unconstrained: every query tool prints a different shape and the shape moves between tool versions, and we would rather keep the whole output than normalise it away. Handles multi-GPU and heterogeneous systems. Required fields: vendor and data.
Add remaining hardware inventory fields to metadata.hardware: - cpu: lscpu JSON output (architecture, cores, cache) - memory: /proc/meminfo parsed (total, free, swap) - storage: lsblk array (devices, sizes, mounts) - system: lshw hardware tree (motherboard, buses, peripherals) Constrain only the container type of each field and leave the keys inside alone. Writing a normalised schema per tool would mean chasing every tool's output format forever, and the point of these fields is to keep what the tool said so a result can be reproduced later. All fields accept raw tool output as JSON. Privacy note: lshw should use -sanitize flag to remove serial numbers.
Add metadata.environment with software environment fields: - os_info: lsb_release output (distro, version, codename) - hostname: system identifier for multi-node tracking - python_requirements: dependency list from requirements.txt - software: key-value object for compiler/library versions Keep software as a plain name-to-version map: the common case is exactly that, and a value can still be an object when a tool needs to record a path or flags. All fields optional. Software uses additionalProperties for flexibility with tool-specific metadata.
Add DOI field for archival identifiers. Pattern validates standard
DOI format (10.{registrant}/{suffix}). Examples included for common
repositories: Zenodo, Figshare, OSF.
Validate the format so a resolver URL or a half-copied identifier
gets caught on write instead of on someone else's read.
Optional field typically added post-publication. Provides permanent
citable link to complete dataset.
Update schema description to reflect comprehensive metadata support. Add a README describing the six metadata categories and their purpose.
Fix a silent 1000x error the metadata reorganization introduced. Both readers of the time unit still looked for the flat metadata.timeunit key that moved to metadata.session.timeunit, and metadata does not forbid unknown keys, so a file written the way the new README says validated cleanly and then fell through to the "seconds" default. Every objective time, time budget and curve came out 1000x too large for a file in milliseconds, 10^9x for nanoseconds, with no warning and entirely plausible-looking plots. Add get_T4_timeunit to the formats interface and call it from both sites. It prefers metadata.session.timeunit and falls back to the flat key, so files written before the reorganization -- including this repo's own integration fixture -- keep working.
|
Hi Floris, |
|
I'm just going to add one more thing to discuss here, so that I won't forget. Currently (and actually always), T4 schema has had "compilation_time" field name. KernelTuner has "compilation" and autotuning_methodology had both "compilation" and "compilation_time" in git history. KTT puts "compilation_time" into T4 json (because that's what the schema says), but I don't mind changing it to "compilation" if we agree that it's a default choice and the first thing that comes to mind. No other time field have "_time" appended to them, so it would make it more consistent. |
Hi,
I have been working on integrating KTT as an autotuner supported in autotuning_methodology. During that process I came across several necessary changes in T4 results schema so that KTT can read full space search space files and simulate tuning with them. The changes are summarized below. I have kept it backward compatible, everything is optional, and naming is consistent with snake_case. I would suggest bumping schema version to 1.1.0 or 1.0.1 if this pull request is accepted.
I'm happy to discuss these changes and find common ground if something is not suitable for your needs.
Regards,
Janka
Summary of Changes
1. Added
metadataObject (Top-Level)compute_api: API used (OpenCL/CUDA/Vulkan)platform: Platform/SDK namedevice: Device nameautotuner: Framework name (e.g., "KTT")autotuner_version: Framework versiontimestamp: Session start timestamptimeunit: Time unit for all measurements (lowercase snake_case: "nanoseconds", "microseconds", "milliseconds", "seconds")2. Added
typeField to Measurementsmeasurementsarray3. Enhanced
timesObject with New Fieldskernel_overhead: Time spent on kernel launch overheaddata: Time spent on data movement (host-device memory transfers)profiling_runs: Time spent executing profiling runsprofiling_overhead: Overhead from profiling instrumentation4. Added
compilation_dataObjecttimes.compilation_data)5. Enhanced Existing Fields
timespropertiesconfigurationvalues are always stringscorrectnessas binary (0 or 1)