Skip to main content

generate_env_file_content

Function generate_env_file_content 

Source
pub fn generate_env_file_content(
    hip_visible_devices: &str,
    rocm_path: &str,
    rocm_version: &str,
    rocm_channel: &str,
    gpu_arch: &str,
    hsa_override_gfx_version: &str,
    python_bin: &str,
) -> String
Expand description

Generate the environment file content.

This produces a shell-sourceable file with all required environment variables. The content uses if [ -z ... ] guards to avoid overriding existing values, matching the original script behavior exactly.

ยงValidation

  • VAL-VBA-016: Produces shell-sourceable content
  • VAL-VBA-017: Includes ROCm optimization settings