Add Mac OS support for Apple Silicon (#770)
* Made an install script and auto updates env for mac * GPU sensors and initial training working for MAC. Still WIP. * Switch dataloader to single threaded until I can work around some mac pickeling issues. * Get quantization working on mac * Fix mac exclusive imports so they don't break other builds. * Add mac instructions to the UI
This commit is contained in:
@@ -9,7 +9,11 @@ def value_map(inputs, min_in, max_in, min_out, max_out):
|
||||
|
||||
|
||||
def flush(garbage_collect=True):
|
||||
torch.cuda.empty_cache()
|
||||
if torch.cuda.is_available():
|
||||
torch.cuda.empty_cache()
|
||||
# if is mps, also clear the mps cache
|
||||
if torch.backends.mps.is_available():
|
||||
torch.mps.empty_cache()
|
||||
if garbage_collect:
|
||||
gc.collect()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user