[Core] add "balanced" `device_map` support to pipelines #6857
get device <-> component mapping when using multiple gpus.
6e9aba17
condition the device_map bits.
c7c6f06f
relax condition
f2d795bc
Merge branch 'main' into pipeline-device-map-auto
351fa63b
device_map progress.
6d8e5d48
device_map enhancement
7e72a596
some cleaning up and debugging
3e9e3baf
SunMarc
dismissed these changes
on 2024-02-13
SunMarc
dismissed their stale review
2 years ago
Merge branch 'main' into pipeline-device-map-auto
c30b1651
Apply suggestions from code review
b78e940a
incorporate suggestions from PR.
06d3bae1
remove multi-gpu condition for now.
b00b71d1
Merge branch 'main' into pipeline-device-map-auto
8177b437
guard check the component -> device mapping
1cd6271b
Merge branch 'main' into pipeline-device-map-auto
5f4a2d44
fix: device_memory variable
bc60b0ee
Merge branch 'main' into pipeline-device-map-auto
68893d7b
Merge branch 'main' into pipeline-device-map-auto
3e22470e
Merge branch 'main' into pipeline-device-map-auto
b8576619
Merge branch 'main' into pipeline-device-map-auto
76aa9477
Merge branch 'main' into pipeline-device-map-auto
5a747bcb
dispatching transformers model to have force_hooks=True
b79662ae
better guarding for transformers device_map
a072083a
Merge branch 'main' into pipeline-device-map-auto
dbde760d
introduce support balanced_low_memory and balanced_ultra_low_memory.
d36af6ce
remove device_map patch.
48853d01
fix: intermediate variable scoping.
c8c4020b
resolve conflicts.
9f82b5b6
fix: condition in cpu offload.
951af8d2
fix: flax class restrictions.
45f9d1d1
Merge branch 'main' into pipeline-device-map-auto
588df06d
resolve conflicts.
79386be2
remove modifications from cpu_offload and model_offload
2df95030
SunMarc
dismissed these changes
on 2024-03-11
SunMarc
dismissed their stale review
2 years ago
Merge branch 'main' into pipeline-device-map-auto
ab5c612b
incorporate changes.
055c0573
add a simple forward pass test
87803801
add: torch_device in get_inputs()
be90a71d
add: tests
bcca61d7
remove print
01a77b6a
sayakpaul
marked this pull request as ready for review 2 years ago
safe-guard to(), model offloading and cpu offloading when balanced is…
c39d91f2
Merge branch 'main' into pipeline-device-map-auto
7ddb6e8a
Merge branch 'main' into pipeline-device-map-auto
52d8d89f
style
120709c4
SunMarc
approved these changes
on 2024-03-14
remove .
fc9b2209
safeguard device_map with more checks and remove invalid device_mappi…
25d04b82
make a class attribute and adjust tests accordingly.
9ba3773b
fix device_map check
a216b542
fix test
2ea57ddd
adjust comment
2bd55cd1
sayakpaul
changed the title [Core] add auto `device_map` support to pipelines [Core] add "balanced" `device_map` support to pipelines 2 years ago
fix: device_map attribute
7e38e692
Merge branch 'main' into pipeline-device-map-auto
d6b7caa3
Merge branch 'main' into pipeline-device-map-auto
87b020df
Merge branch 'main' into pipeline-device-map-auto
8d559078
Merge branch 'main' into pipeline-device-map-auto
2e25f46c
Merge branch 'main' into pipeline-device-map-auto
8f47a69a
fix: dispatching.
cdf5e9b5
max_memory test for pipeline
5f1dbc35
version guard the tests
b27b84a9
fix guard.
d2504514
address review feedback.
606753e3
reset_device_map method.
7571ceac
Merge branch 'main' into pipeline-device-map-auto
f5d8a8f8
add: test for reset_hf_device_map
9e628cf1
fix a couple things.
8a828a8e
Merge branch 'main' into pipeline-device-map-auto
3cb65801
add reset_device_map() in the error message.
0f92bc7b
add tests for checking reset_device_map doesn't have unintended conse…
3bccdd05
fix reset_device_map and offloading tests.
4ef5f1f4
create _get_final_device_map utility.
883b6cad
hf_device_map -> _hf_device_map
fee86e96
add documentation
97dc870b
yiyixuxu
approved these changes
on 2024-04-01
merge main and resolve conflicts.
eebc06da
SunMarc
approved these changes
on 2024-04-02
Merge branch 'main' into pipeline-device-map-auto
e5c85fca
add notes suggested by Marc.
5547608f
stevhliu
approved these changes
on 2024-04-02
Merge branch 'main' into pipeline-device-map-auto
28d1c058
styling.
9390e24d
Apply suggestions from code review
15bfbfc9
move updates within gpu condition.
fe050ef1
other docs related things
1d16c2c3
note on ignore a device not specified in .
2ad133df
provide a suggestion if device mapping errors out.
723bc131
fix: typo.
9dcdf0bf
_hf_device_map -> hf_device_map
86e6b59e
Empty-Commit
e0638119
add: example hf_device_map.
fec5ff9a
Merge branch 'main' into pipeline-device-map-auto
e6a8769b
Merge branch 'main' into pipeline-device-map-auto
ad1a412e
Merge branch 'main' into pipeline-device-map-auto
c6c32999
Merge branch 'main' into pipeline-device-map-auto
f8b76a27
Merge branch 'main' into pipeline-device-map-auto
dde27479
resolve conflicts and merged main
8931d0da
Merge branch 'main' into pipeline-device-map-auto
4279015d
Merge branch 'main' into pipeline-device-map-auto
849d396b
sayakpaul
merged
3e4a6bd2
into main 2 years ago
sayakpaul
deleted the pipeline-device-map-auto branch 2 years ago
Assignees
No one assigned