Skip to content

Commit

Permalink
Add mask device, fix test
Browse files Browse the repository at this point in the history
Reviewed By: azzolini

Differential Revision: D5930258

fbshipit-source-id: 16fdc2aeba7d95e815e55ca495118a5129495bb0
  • Loading branch information
Aapo Kyrola authored and facebook-github-bot committed Sep 28, 2017
1 parent 642dea4 commit b9009df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion caffe2/python/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,12 @@ def IsOperatorWithEngine(op_type, engine):
return (op_type + "_ENGINE_" + engine in _REGISTERED_OPERATORS)


def DeviceOption(device_type, cuda_gpu_id=0, random_seed=None):
def DeviceOption(device_type, cuda_gpu_id=0, random_seed=None, node_name=None):
option = caffe2_pb2.DeviceOption()
option.device_type = device_type
option.cuda_gpu_id = cuda_gpu_id
if node_name is not None:
option.node_name = node_name
if random_seed is not None:
option.random_seed = random_seed
return option
Expand Down

0 comments on commit b9009df

Please sign in to comment.