I have a custom Python function, which has several parameters and performs some logic. It only uses native Python functions or Numpy functions:
def my_function(param_1, param_2, ..., param_N): # Logic ... return output
I want to speed up my function execution by using GPUs and passing a torch batch to this function instead of individual parameters. I could pass a numpy array to this function instead of individual parameters and
ravel() the entries into variables inside the function. But I dont know how to go from here to passing a whole batch of data and process it as a batch.
Is this possible? Do I need to use only
torch functions instead of numpy?