[go: nahoru, domu]

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

SafeH2DMemcpy removed in thunk #49914

Open
VertexC opened this issue May 31, 2021 · 0 comments
Open

SafeH2DMemcpy removed in thunk #49914

VertexC opened this issue May 31, 2021 · 0 comments
Assignees
Labels
comp:xla XLA stat:awaiting tensorflower Status - Awaiting response from tensorflower TF 2.5 Issues related to TF 2.5 type:others issues not falling in bug, perfromance, support, build and install or feature

Comments

@VertexC
Copy link
VertexC commented May 31, 2021

I am looking into some profiling issue of XLA. I noticed that in tf2.5 and newer SafeH2DMemcpy part is remove from convolution_thunk.cc/custom_call_thunk/convolution_thunk.

By looking into old code of convlution_thunk's memcpy part

  // Write the output tuple.
  const int kNumOutputs = 2;
  auto ptrs = absl::make_unique<void*[]>(kNumOutputs);
  ptrs[0] = result_buffer.opaque();
  ptrs[1] = scratch.opaque();
  se::DeviceMemory<void*> tuple_addr(
      buffer_allocations.GetDeviceAddress(tuple_result_buffer_));
  SafeH2DMemcpy(tuple_addr, std::move(ptrs), kNumOutputs, params.stream,
                params.deferred_host_callbacks);

I am wondering

  • What are result_buffer, scratch_buffer and tuple_result_buffer here? Are they cpu buffer or gpu buffer?
  • Why it does a H2D copy instead of D2H copy? Why result is not from gpu to cpu?
  • Why this memcpy is now removed? What is the original purpose of this?

Would really appreciate any ideas on this.

@VertexC VertexC added the type:others issues not falling in bug, perfromance, support, build and install or feature label May 31, 2021
@UsharaniPagadala UsharaniPagadala added the TF 2.5 Issues related to TF 2.5 label Jun 1, 2021
@ymodak ymodak added comp:xla XLA stat:awaiting tensorflower Status - Awaiting response from tensorflower labels Jun 3, 2021
@ymodak ymodak assigned r4nt and unassigned ymodak Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:xla XLA stat:awaiting tensorflower Status - Awaiting response from tensorflower TF 2.5 Issues related to TF 2.5 type:others issues not falling in bug, perfromance, support, build and install or feature
Projects
None yet
Development

No branches or pull requests

4 participants