furiosa-ai / furiosa-models

FuriosaAI Model Zoo Project
https://furiosa-ai.github.io/furiosa-models/
Apache License 2.0
10 stars 6 forks source link

Ensure Backward Compatibility by Checking FURIOSA_DEVICES & NPU_DEVNAME #184

Closed furiosamg closed 1 year ago

furiosamg commented 1 year ago

Pull Request Description:

In this pull request, address backward compatibility by checking the environment variables FURIOSA_DEVICES and NPU_DEVNAME in addition to the provided device string in the get_pe_count_from_device_str function of furiosa/models/cli/api.py. This adjustment allows for seamless support of older configurations and ensures a smooth transition for users who may still rely on these environment variables.

Changes:

Modified the get_pe_count_from_device_str function to consider the FURIOSA_DEVICES and NPU_DEVNAME environment variables if no device string is provided explicitly. This modification enhances the backward compatibility of the codebase, ensuring that users relying on the older environment variable configurations continue to experience consistent behavior.