hyperactor_mesh/config.rs
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 * All rights reserved.
4 *
5 * This source code is licensed under the BSD-style license found in the
6 * LICENSE file in the root directory of this source tree.
7 */
8
9//! Configuration for Hyperactor Mesh.
10//!
11//! This module provides hyperactor_mesh-specific configuration attributes that extend
12//! the base hyperactor configuration system.
13
14use hyperactor::attrs::declare_attrs;
15use hyperactor::config::CONFIG;
16use hyperactor::config::ConfigAttr;
17
18// Declare hyperactor_mesh-specific configuration keys
19declare_attrs! {
20 /// The maximium for a dimension size allowed for a folded shape
21 /// when reshaping during casting to limit fanout.
22 /// usize::MAX means no reshaping as any shape will always be below
23 /// the limit so no dimension needs to be folded.
24 @meta(CONFIG = ConfigAttr {
25 env_name: Some("HYPERACTOR_MESH_MAX_CAST_DIMENSION_SIZE".to_string()),
26 py_name: None,
27 })
28 pub attr MAX_CAST_DIMENSION_SIZE: usize = usize::MAX;
29}