(producer_op)
| 349 | # NOTE: this assumes that the params is determined by producer op with the |
| 350 | # only exception be CopyGPUToCPU which is CUDA op but returns CPU tensor. |
| 351 | def _get_device_option(producer_op): |
| 352 | if producer_op.type == "CopyGPUToCPU": |
| 353 | return caffe2_pb2.DeviceOption() |
| 354 | else: |
| 355 | return producer_op.device_option |
| 356 | |
| 357 | with ScopedWS("__get_params_from_init_net__", is_reset=True, is_cleanup=True) as ws: |
| 358 | ws.RunNetOnce(init_net) |
no outgoing calls
no test coverage detected