Changes the task assignment logic to use GPU direct communication by default where supported. Closes #5253