Maintain consistency with established naming patterns and conventions throughout the codebase. This includes matching enum names with their value prefixes, following existing API naming patterns, using consistent variable naming within similar contexts, and applying appropriate prefixes to avoid naming conflicts.
Maintain consistency with established naming patterns and conventions throughout the codebase. This includes matching enum names with their value prefixes, following existing API naming patterns, using consistent variable naming within similar contexts, and applying appropriate prefixes to avoid naming conflicts.
Key principles:
diffusion_alg
for DIFFUSION_ALG_*
values)llama_sampler_init_*
family)api_prefix
instead of server_prefix
when other variables use api_*
)LLM_KV_MAMBA_RMS_NORM
instead of LLM_KV_FALCON_H1_MAMBA_RMS_NORM
)GGML_CPU_
prefix for CPU-specific macros)Example:
// Good: Enum name matches value prefix
enum diffusion_alg {
DIFFUSION_ALG_ORIGIN = 0,
DIFFUSION_ALG_MASKGIT_PLUS = 1,
};
// Bad: Enum name doesn't match value prefix
enum diffusion_algorithm {
DIFFUSION_ALG_ORIGIN = 0,
DIFFUSION_ALG_MASKGIT_PLUS = 1,
};
Enter the URL of a public GitHub repository