Skip to content

Commit

Permalink
Fix Perf Analyzer CPU-only build (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tabrizian authored Oct 20, 2022
1 parent 6211f98 commit aa8f2a2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,15 @@ TritonCApiClientBackend::RegisterSystemMemory(
return Error::Success;
}

#ifdef TRITON_ENABLE_GPU
Error
TritonCApiClientBackend::RegisterCudaMemory(
const std::string& name, void* handle, const size_t byte_size)
{
RETURN_IF_ERROR(triton_loader_->RegisterCudaMemory(name, handle, byte_size));
return Error::Success;
}
#endif // TRITON_ENABLE_GPU

void
TritonCApiClientBackend::ParseInferInputToTriton(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,11 @@ class TritonCApiClientBackend : public ClientBackend {
const std::string& model_name = "",
const std::string& model_version = "") override;

#ifdef TRITON_ENABLE_GPU
/// See ClientBackend::RegisterCudaMemory
Error RegisterCudaMemory(
const std::string& name, void* handle, const size_t byte_size) override;
#endif // TRITON_ENABLE_GPU

/// See ClientBackend::RegisterSystemMemory
Error RegisterSystemMemory(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1225,6 +1225,7 @@ TritonLoader::~TritonLoader()
ClearHandles();
}

#ifdef TRITON_ENABLE_GPU
Error
TritonLoader::RegisterCudaMemory(
const std::string& name, void* handle, const size_t byte_size)
Expand All @@ -1233,6 +1234,7 @@ TritonLoader::RegisterCudaMemory(
name, handle, byte_size, 0 /* device id */));
return Error::Success;
}
#endif // TRITON_ENABLE_GPU

Error
TritonLoader::RegisterSystemMemory(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,10 @@ class TritonLoader : public tc::InferenceServerClient {
return Error::Success;
}

#ifdef TRITON_ENABLE_GPU
Error RegisterCudaMemory(
const std::string& name, void* handle, const size_t byte_size);
#endif // TRITON_ENABLE_GPU

Error RegisterSystemMemory(
const std::string& name, void* ptr, const size_t byte_size);
Expand Down

0 comments on commit aa8f2a2

Please sign in to comment.