File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,25 +64,8 @@ def call_profile_executable(self) -> None:
6464 raise RuntimeError (
6565 "_call_profile_executable called with no active executable."
6666 )
67- # If the profile request contains xprofTraceOptions, then we need to pass
68- # out_avals and out_shardings to the executable call because the
69- # executable will return a future that needs to be resolved. This is true
70- # for both starting and stopping a trace.
71- if (
72- self .profile_request is not None
73- and "xprofTraceOptions" in self .profile_request
74- ):
75- out_avals = [jax .core .ShapedArray ((1 ,), jnp .object_ )]
76- out_shardings = [
77- getattr (
78- jax .sharding ,
79- "make_single_device_sharding" ,
80- jax .sharding .SingleDeviceSharding ,
81- )(backend .get_default_device ())
82- ]
83- else :
84- out_avals = ()
85- out_shardings = ()
67+ out_avals = ()
68+ out_shardings = ()
8669
8770 _ , result_future = self .executable .call (
8871 out_avals = out_avals , out_shardings = out_shardings
Original file line number Diff line number Diff line change @@ -389,10 +389,8 @@ def test_stop_trace_with_xprof_options_passes_out_avals(self):
389389
390390 with self .subTest ("out_avals_properties" ):
391391 _ , kwargs = self .mock_plugin_executable_cls .return_value .call .call_args
392- self .assertLen (kwargs ["out_avals" ], 1 )
393- (out_aval ,) = kwargs ["out_avals" ]
394- self .assertEqual (out_aval .shape , (1 ,))
395- self .assertEqual (out_aval .dtype , jnp .object_ )
392+ self .assertEqual (kwargs ["out_avals" ], ())
393+ self .assertEqual (kwargs ["out_shardings" ], ())
396394
397395 def test_stop_trace_before_start_error (self ):
398396 with self .assertRaisesRegex (
You can’t perform that action at this time.
0 commit comments