MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / EnablePeerAccess

Method EnablePeerAccess

tensorflow/stream_executor/cuda/cuda_driver.cc:1564–1581  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

1562}
1563
1564/* static */ port::Status GpuDriver::EnablePeerAccess(GpuContext* from,
1565 GpuContext* to) {
1566 if (from == to) {
1567 return port::Status::OK(); // A context can always access its own memory.
1568 }
1569
1570 ScopedActivateContext activated{from};
1571 CUresult result = cuCtxEnablePeerAccess(to->context(), 0 /* = flags */);
1572 if (result != CUDA_SUCCESS &&
1573 result != CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED) {
1574 return port::Status(
1575 port::error::INTERNAL,
1576 absl::StrFormat("failed to enable peer access from %p to %p: %s", from,
1577 to, ToString(result)));
1578 }
1579
1580 return port::Status::OK();
1581}
1582
1583/* static */ bool GpuDriver::BeginGraphCaptureOnStream(
1584 GpuContext* context, CUstream stream, GpuStreamCaptureMode mode) {

Callers

nothing calls this directly

Calls 3

ToStringFunction · 0.70
StatusEnum · 0.50
contextMethod · 0.45

Tested by

no test coverage detected