MCPcopy Create free account
hub / github.com/pytorch/pytorch / make_unique_blob_name

Method make_unique_blob_name

caffe2/python/optimizer.py:99–113  ·  view source on GitHub ↗

Returns a blob name that will be unique to the current device and optimizer instance.

(self, base_str)

Source from the content-addressed store, hash-verified

97 self._use_dedicated_lr_iteration_counter = val
98
99 def make_unique_blob_name(self, base_str):
100 """
101 Returns a blob name that will be unique to the current device
102 and optimizer instance.
103 """
104 current_scope = scope.CurrentDeviceScope()
105 if current_scope is None:
106 return self.get_cpu_blob_name(base_str)
107
108 if core.IsGPUDeviceType(current_scope.device_type):
109 return self.get_gpu_blob_name(
110 base_str, current_scope.device_id, current_scope.node_name
111 )
112 else:
113 return self.get_cpu_blob_name(base_str, current_scope.node_name)
114
115 def build_lr(
116 self,

Callers 6

build_lrMethod · 0.95
build_non_lr_iterMethod · 0.95
_runMethod · 0.80
_runMethod · 0.80
_runMethod · 0.80
_runMethod · 0.80

Calls 2

get_cpu_blob_nameMethod · 0.95
get_gpu_blob_nameMethod · 0.95

Tested by

no test coverage detected