compconf
compconf enables flexible, type-rich comptime configuration of Cerebras Software Language (CSL) projects
- Free software: MIT license
Usage
compconf wraps the cslc compiler, forwarding all non-compconf flags.
python3 -m compconf --compconf-jq '. += {"baz:f32": 42.0}'
Access configuration values in csl code using the compconf module.
const compconf = @import("compconf.zig");
fn main() void {
@comptime_print(compconf.get_value("baz", f32));
@comptime_print(compconf.get_value_or("bar", @as(f16, 24.0)));
}
The compconf module provides the following functions:
fn get_value(comptime field_name: comptime_string, comptime T: type) T
fn get_value_or(
comptime field_name: comptime_string, comptime default_value: anytype
) @type_of(default_value)
Available options:
usage: __main__.py [-h] [--compconf-cslc COMPCONF_CSLC] [--compconf-data COMPCONF_DATA] [--compconf-jq COMPCONF_JQ] [--compconf-verbose]
compconf enables flexible, type-rich comptime configuration of csl projects.
options:
-h, --help show this help message and exit
--compconf-cslc COMPCONF_CSLC
compiler command to run
--compconf-data COMPCONF_DATA
json data file to read, if any
--compconf-jq COMPCONF_JQ
jq command to add/modify data (e.g., '. += {"foo:u32": 42}')
--compconf-verbose enable verbose logging
JSON data must be formatted according to `@import_comptime_value` conventions. See <https://sdk.cerebras.net/csl/language/builtins#import-comptime-value> DISCLAIMER: Cerebras Software
Language is the intellectual property of Cerebras Systems, Inc. This project is not an official Cerebras project and is not affiliated with or endorsed by Cerebras Systems, Inc. in any
way. All trademarks, logos, and intellectual property associated with Cerebras Systems remain the exclusive property of Cerebras Systems, Inc.
Singularity Container
A containerized release of compconf is available via <ghcr.io>
singularity exec docker://ghcr.io/mmore500/compconf:v0.6.5 python3 -m compconf --help
Installation
To install from PyPi with pip, run
python3 -m pip install compconf
Disclaimer
Cerebras Software Language is the intellectual property of Cerebras Systems, Inc. This project is not an official Cerebras project and is not affiliated with or endorsed by Cerebras Systems, Inc. in any way. All trademarks, logos, and intellectual property associated with Cerebras Systems remain the exclusive property of Cerebras Systems, Inc.
Metadata
Release files for compconf 0.6.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| compconf-0.6.5.tar.gz | 5.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| compconf-0.6.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.6 kB
Release files / compconf-0.6.5.tar.gz
| Download URL | compconf-0.6.5.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1037c01d871faf52f6e3992159f4e731dc270fdcd8f6d58f870fdecaa7e364d8
|
|
BLAKE2b-256 checksum How to use checksums |
36b2984020e236b87d24366e72bb5e5f2fa15a1b18c50fdfea7bea9783fcd93f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / compconf-0.6.5-py3-none-any.whl
| Download URL | compconf-0.6.5-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e684c935ec1c96dc3d97548b59ea57f2b5f90f42287ad494b4a46bf0d93a19fb
|
|
BLAKE2b-256 checksum How to use checksums |
61b63933bbb7f65a873f3c1dd7e0776a00e944f70088fc9e15646fabca244126
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|