mirror of
https://github.com/ml-explore/mlx.git
synced 2025-12-16 01:49:05 +08:00
Allow dynamic ops per buffer based on dispatches and memory (#1864)
* Allow dynamic ops per buffer based on dispatches and memory * add initial arch values
This commit is contained in:
11
mlx/utils.h
11
mlx/utils.h
@@ -122,11 +122,18 @@ inline int bfs_max_width() {
|
||||
return bfs_max_width_;
|
||||
}
|
||||
|
||||
inline int max_ops_per_buffer() {
|
||||
static int max_ops_per_buffer_ = get_var("MLX_MAX_OPS_PER_BUFFER", 10);
|
||||
inline int max_ops_per_buffer(int default_value) {
|
||||
static int max_ops_per_buffer_ =
|
||||
get_var("MLX_MAX_OPS_PER_BUFFER", default_value);
|
||||
return max_ops_per_buffer_;
|
||||
}
|
||||
|
||||
inline int max_mb_per_buffer(int default_value) {
|
||||
static int max_mb_per_buffer_ =
|
||||
get_var("MLX_MAX_MB_PER_BUFFER", default_value);
|
||||
return max_mb_per_buffer_;
|
||||
}
|
||||
|
||||
inline bool metal_fast_synch() {
|
||||
static bool metal_fast_synch = get_var("MLX_METAL_FAST_SYNCH", 0);
|
||||
return metal_fast_synch;
|
||||
|
||||
Reference in New Issue
Block a user