c9f13b0833ee499a074f15192a6eaf7a6513a296,python/ray/worker.py,,get_gpu_ids,#Any#,376
Before Change
// TODO(ilr) Handle inserting resources in local mode
all_resource_ids = global_worker.core_worker.resource_ids()
assigned_ids = [
resource_id for resource_id, _ in all_resource_ids.get("GPU", [])
]
// If the user had already set CUDA_VISIBLE_DEVICES, then respect that (in
// the sense that only GPU IDs that appear in CUDA_VISIBLE_DEVICES should be
// returned).
if global_worker.original_gpu_ids is not None:
After Change
// TODO(ilr) Handle inserting resources in local mode
all_resource_ids = global_worker.core_worker.resource_ids()
assigned_ids = []
for resource, assignment in all_resource_ids.items():
// Handle both normal and placement group GPU resources.
if resource == "GPU" or resource.startswith("GPU_group_"):
for resource_id, _ in assignment:
assigned_ids.append(resource_id)
// If the user had already set CUDA_VISIBLE_DEVICES, then respect that (in
// the sense that only GPU IDs that appear in CUDA_VISIBLE_DEVICES should be
// returned).
if global_worker.original_gpu_ids is not None:
assigned_ids = [
global_worker.original_gpu_ids[gpu_id] for gpu_id in assigned_ids
]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances Project Name: ray-project/ray
Commit Name: c9f13b0833ee499a074f15192a6eaf7a6513a296
Time: 2020-08-13
Author: ekhliang@gmail.com
File Name: python/ray/worker.py
Class Name:
Method Name: get_gpu_ids
Project Name: ray-project/ray
Commit Name: 1b1466748f1db72835a594d73d502e9787e080a9
Time: 2020-09-04
Author: wlx65005@gmail.com
File Name: streaming/python/runtime/transfer.py
Class Name: DataReader
Method Name: __init__
Project Name: ray-project/ray
Commit Name: f31ee84bfdc6dc2325c8890412a965e509074d0a
Time: 2020-09-05
Author: wlx65005@gmail.com
File Name: streaming/python/runtime/transfer.py
Class Name: DataReader
Method Name: __init__