* Fix HIP_VISIBLE_DEVICES order * Fix device IDs mismatch * Fix review comments- loop order and device range check * Handle incomplete VISIBLE device env variable * Revert "Handle incomplete VISIBLE device env variable"