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_ENV_VAR;
16
17// Declare hyperactor_mesh-specific configuration keys
18declare_attrs! {
19    /// The maximium for a dimension size allowed for a folded shape
20    /// when reshaping during casting to limit fanout.
21    /// usize::MAX means no reshaping as any shape will always be below
22    /// the limit so no dimension needs to be folded.
23    @meta(CONFIG_ENV_VAR = "HYPERACTOR_MESH_MAX_CAST_DIMENSION_SIZE".to_string())
24    pub attr MAX_CAST_DIMENSION_SIZE: usize = usize::MAX;
25}