Pipeline for particle picking in cryo-electron microscopy images using convolutional neural networks trained from positive and unlabeled examples. Also featuring micrograph and tomogram denoising with DNNs.
"import intel_extension_for_pytorch as ipex" is needed for Intel GPU and it is optional in Python code to make it work on platform which does not have this package installed.
torch.xpu is replacement for torch.cuda and this is explicitly used when necessary.
topaz/cuda.py is replaced by topaz/gpu.py file which is more generic.
Most use_cuda=True function argument is replaced by device='cpu'.
torch.*.cuda() is replaced by torch.*.to(device) where device could be 'cpu'|'cuda'|'xpu'.
There is limitation in using torch.nn.Parallel on Intel GPU.
ipex.optimize() is additional optimization on Intel GPU. This is added and commented out since not all configuration is supported as of now. This is for future usage.
This will add Intel(R) Extension for PyTorch which is for Intel(R) GPU support. This needs Intel patched PyTorch and extension and one can refer https://intel.github.io/intel-extension-for-pytorch/index.html#installation?platform=gpu&version=v2.1.10%2Bxpu page for installation.
This contains the below changes.