mirror of
https://github.com/radixark/miles.git
synced 2026-10-02 07:14:53 +08:00
bugfix on deepep init without offloading
This commit is contained in:
@@ -8,10 +8,12 @@ try:
|
||||
old_init = deep_ep.Buffer.__init__
|
||||
|
||||
def new_init(self, *args, **kwargs):
|
||||
torch_memory_saver._impl._binary_wrapper.cdll.tms_set_interesting_region(False)
|
||||
if torch_memory_saver._impl is not None:
|
||||
torch_memory_saver._impl._binary_wrapper.cdll.tms_set_interesting_region(False)
|
||||
old_init(self, *args, **kwargs)
|
||||
torch.cuda.synchronize()
|
||||
torch_memory_saver._impl._binary_wrapper.cdll.tms_set_interesting_region(True)
|
||||
if torch_memory_saver._impl is not None:
|
||||
torch_memory_saver._impl._binary_wrapper.cdll.tms_set_interesting_region(True)
|
||||
|
||||
deep_ep.Buffer.__init__ = new_init
|
||||
except ImportError:
|
||||
|
||||
Reference in New Issue
Block a user