Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete unimplemented methods from ComputationClient #5639

Merged
merged 5 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,18 +209,6 @@ only be enabled for debugging.
* ```XLA_SAVE_HLO_FILE```: If set, the path to a local file where, in case of compilation/execution
error, the offending HLO graph will be saved.

* ```XLA_GET_TENSORS_OPBYOP```: Enables pure _OpByOp_ dispatch. The _PyTorch/XLA_ software tries to
fuse together many _PyTorch_ operations into a single computation graph, but sometimes, either
for debugging, or in case the _PyTorch_ code have a very dynamic nature (in shapes or graph
terms), it is better to force the execution in _OpByOp_ mode (every IR node is lowered into
a separate _XLA_ computation, and chain-executed). This environment variable, if set to 1,
enables _OpByOp_ during the "get tensors" operation (the operation used by _PyTorch/XLA_ to
fetch intermediate values back from the _TPU_ device into _PyTorch_ CPU tensors).

* ```XLA_SYNC_TENSORS_OPBYOP```: The same as _XLA_GET_TENSORS_OPBYOP_ but for "sync tensors"
operation (the operation used at the end of a step, to flush pending IR computations and
materialize them into _TPU_ device data).

* ```XLA_SYNC_WAIT```: Forces the XLA tensor sync operation to wait for its completion, before
moving to the next step.

Expand Down
20 changes: 0 additions & 20 deletions configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,26 +104,6 @@ variables:
type: bool
default_value: false
feature_variables:
XLA_GET_TENSORS_OPBYOP:
description:
- Enables pure OpByOp dispatch. The PyTorch/XLA software tries to fuse
together many PyTorch operations into a single computation graph, but
sometimes, either for debugging, or in case the PyTorch code have a
very dynamic nature (in shapes or graph terms), it is better to force
the execution in OpByOp mode (every IR node is lowered into a
separate XLA computation, and chain-executed). This environment
variable, if set to true, enables OpByOp during the "get tensors"
operation (the operation used by PyTorch/XLA to fetch intermediate
values back from the TPU device into PyTorch CPU tensors).
type: bool
default_value: false
XLA_SYNC_TENSORS_OPBYOP:
description:
- The same as XLA_GET_TENSORS_OPBYOP but for "sync tensors" operation
(the operation used at the end of a step, to flush pending IR
computations and materialize them into TPU device data).
type: bool
default_value: false
XLA_SYNC_WAIT:
description:
- Forces the XLA tensor sync operation to wait for its completion,
Expand Down
36 changes: 0 additions & 36 deletions test/test_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -1832,42 +1832,6 @@ def test(self):
self.assertEqual(len(report), 0)


class TestAsyncScalar(test_utils.XlaTestCase):

def test_rng_seed_transfer(self):
xla_device = xm.xla_device()
async_mode = xu.getenv_as('XLA_TRANSFER_SCALAR_ASYNC', bool, defval=False)
# mark_step to clear the rng seed
xm.mark_step()

transfer_to_server_async_metric = met.metric_data("TransferToServerAsync")
async_transfer_count = 0 if transfer_to_server_async_metric == None else transfer_to_server_async_metric[
0]
t1 = torch.randn(3, 3, device=xla_device)
xm.mark_step()
if async_mode:
assert met.metric_data(
"TransferToServerAsync")[0] == async_transfer_count + 1
else:
assert met.metric_data("TransferToServerAsync") == None

def test_scalar_transfer(self):
xla_device = xm.xla_device()
async_mode = xu.getenv_as('XLA_TRANSFER_SCALAR_ASYNC', bool, defval=False)

transfer_to_server_async_metric = met.metric_data("TransferToServerAsync")
async_transfer_count = 0 if transfer_to_server_async_metric == None else transfer_to_server_async_metric[
0]
t1 = torch.randn(3, 3).to(xla_device)
t2 = t1 / 0.5
t3 = t2.cpu()
if async_mode:
assert met.metric_data(
"TransferToServerAsync")[0] == async_transfer_count + 1
else:
assert met.metric_data("TransferToServerAsync") == None


class TestWaitDeviceOps(test_utils.XlaTestCase):

def test_wait_device_ops(self):
Expand Down
2 changes: 0 additions & 2 deletions torch_xla/csrc/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ ptxla_cc_library(
"matrix.cpp",
"nll_loss.cpp",
"nms_op.cpp",
"op_by_op_executor.cpp",
"pooling.cpp",
"random.cpp",
"reduction.cpp",
Expand Down Expand Up @@ -88,7 +87,6 @@ ptxla_cc_library(
"matrix.h",
"nll_loss.h",
"nms_op.h",
"op_by_op_executor.h",
"pooling.h",
"random.h",
"reduction.h",
Expand Down
234 changes: 0 additions & 234 deletions torch_xla/csrc/op_by_op_executor.cpp

This file was deleted.

53 changes: 0 additions & 53 deletions torch_xla/csrc/op_by_op_executor.h

This file was deleted.

Loading