Skip to content

Commit

Permalink
Remove qpud (#91)
Browse files Browse the repository at this point in the history
* Remove qpud
---------

Signed-off-by: Alex McCaskey <amccaskey@nvidia.com>
  • Loading branch information
amccaskey committed Apr 21, 2023
1 parent 287c37d commit a48f153
Show file tree
Hide file tree
Showing 42 changed files with 9 additions and 3,135 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
[submodule "tpls/googletest-src"]
path = tpls/googletest-src
url = https://github.com/google/googletest
[submodule "tpls/rpclib"]
path = tpls/rpclib
url = https://github.com/rpclib/rpclib
[submodule "tpls/llvm"]
path = tpls/llvm
url = https://github.com/llvm/llvm-project.git
Expand Down
8 changes: 0 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -312,14 +312,6 @@ add_subdirectory(tpls/spdlog)
set_property(TARGET spdlog APPEND PROPERTY INTERFACE_SYSTEM_INCLUDE_DIRECTORIES)
target_compile_options(spdlog PRIVATE -Wno-covered-switch-default)

# May want to provide a hook to this
if (CUDAQ_ENABLE_RPC_LOGGING)
set(RPCLIB_ENABLE_LOGGING TRUE)
endif()
set(RPCLIB_EXTRA_BUILD_FLAGS "-Wno-suggest-override;-Wno-documentation;-Wno-unused-variable;-Wno-unused-but-set-variable;-Wno-unsafe-buffer-usage")
add_subdirectory(tpls/rpclib EXCLUDE_FROM_ALL)
set_property(TARGET rpc APPEND PROPERTY INTERFACE_SYSTEM_INCLUDE_DIRECTORIES)

# Check for CUDA Support
# ==============================================================================
include(CheckLanguage)
Expand Down
9 changes: 0 additions & 9 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,6 @@ License at <https://github.com/fmtlib/fmt/blob/master/LICENSE.rst>

----------------------------------------------------------------

RPCLib - MIT License
<https://github.com/rpclib/rpclib>

Originally developed by Tamas Szelei.
The incorporated source code and its license can be found as a submodule on the CUDA Quantum repository.
License at <https://github.com/rpclib/rpclib/blob/master/LICENSE.md>

----------------------------------------------------------------

SPDLog - MIT License
<https://github.com/gabime/spdlog>

Expand Down
16 changes: 0 additions & 16 deletions Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,22 +128,6 @@ product terms.
This library defines the `quantum_platform` architecture, enabling CUDA Quantum
to target both simulated and physical quantum computing architectures.

### `runtime/qpud_client`

This folder contains a client library for interacting with the remote `qpud`
process daemon.

### `tools/qpud`

This folder implements the `qpud` executable. `qpud` is meant to serve as a
separate daemon process that emulates the true host, classical driver cpu,
quantum register architectural separation. It implements a client/server model
and accepts Quake code, JIT compiles it, and enables its execution on local
emulators, or physical remote vendor quantum computers.

This folder contains a TargetBackend type with specializations that target the
nvqir, quantinuum, and rigetti backends.

### `tools/cudaq-quake`

This folder contains the implementation of the `cudaq-quake` tool. This tool
Expand Down
2 changes: 1 addition & 1 deletion docs/sphinx/using/advanced/cudaq_ir.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ saved to file :code:`simple.cpp`, we see the following output from :code:`nvq++`
llc --relocation-model=pic --filetype=obj -O2 simple.ll.p3De4L -o simple.qke.o
llc --relocation-model=pic --filetype=obj -O2 simple.ll -o simple.classic.o
clang++ -L/usr/lib/gcc/x86_64-linux-gnu/11 -L/usr/lib64 -L/lib/x86_64-linux-gnu -L/lib64 -L/usr/lib/x86_64-linux-gnu -L/lib -L/usr/lib -L/usr/local/cuda/lib64/stubs -r simple.qke.o simple.classic.o -o simple.o
clang++ -Wl,-rpath,lib -Llib -L/usr/lib/gcc/x86_64-linux-gnu/11 -L/usr/lib64 -L/lib/x86_64-linux-gnu -L/lib64 -L/usr/lib/x86_64-linux-gnu -L/lib -L/usr/lib -L/usr/local/cuda/lib64/stubs simple.o -lcudaq -lcudaq-common -lcudaq-mlir-runtime -lcudaq-builder -lcudaq-ensmallen -lcudaq-nlopt -lcudaq-spin -lcudaq-qpud-client -lcudaq-em-qir -lcudaq-platform-default -lnvqir -lnvqir-qpp
clang++ -Wl,-rpath,lib -Llib -L/usr/lib/gcc/x86_64-linux-gnu/11 -L/usr/lib64 -L/lib/x86_64-linux-gnu -L/lib64 -L/usr/lib/x86_64-linux-gnu -L/lib -L/usr/lib -L/usr/local/cuda/lib64/stubs simple.o -lcudaq -lcudaq-common -lcudaq-mlir-runtime -lcudaq-builder -lcudaq-ensmallen -lcudaq-nlopt -lcudaq-spin -lcudaq-em-qir -lcudaq-platform-default -lnvqir -lnvqir-qpp
The workflow orchestrated above is best visualized in the following figure.

Expand Down
2 changes: 0 additions & 2 deletions python/utils/LinkedLibraryHolder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,6 @@ void LinkedLibraryHolder::setPlatform(
const std::string &name, std::map<std::string, std::string> config) {

std::string mutableName = name;
if (name == "qpud")
mutableName = "default-qpud";

// need to set qpu to cuquantum for mqpu
if (name == "mqpu")
Expand Down
1 change: 0 additions & 1 deletion runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
add_subdirectory(common)
add_subdirectory(nvqir)
add_subdirectory(cudaq)
add_subdirectory(qpud-client)

# Install
# ==============================================================================
Expand Down
3 changes: 1 addition & 2 deletions runtime/cudaq.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,7 @@ KernelArgsCreator getArgsCreator(const std::string &kernelName);
/// @return
bool kernelHasConditionalFeedback(const std::string &kernelName);

/// @brief Provide a hook to set the remote qpud target backend.
/// @param backend
/// @brief Provide a hook to set the target backend.
void set_qpu_backend(const char *backend);

/// @brief Utility function for setting the shots on the platform
Expand Down
1 change: 0 additions & 1 deletion runtime/cudaq/platform/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# ============================================================================ #

add_subdirectory(default)
add_subdirectory(qpud)
if (CUDA_FOUND AND CUSTATEVEC_ROOT)
add_subdirectory(mqpu)
endif()
4 changes: 1 addition & 3 deletions runtime/cudaq/platform/default/DefaultQuantumPlatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ LLVM_INSTANTIATE_REGISTRY(cudaq::QPU::RegistryType)

namespace {
/// The DefaultQPU models a simulated QPU by specifically
/// targeting the QIS ExecutionManager. This QPU is meant
/// to be used in Library Mode (no qpud daemon or remote
/// physical QPU invocation)
/// targeting the QIS ExecutionManager.
class DefaultQPU : public cudaq::QPU {
public:
DefaultQPU() = default;
Expand Down
4 changes: 2 additions & 2 deletions runtime/cudaq/platform/default/rest/RemoteRESTQPU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ class RemoteRESTQPU : public cudaq::QPU {
execution_queue->enqueue(task);
}

/// @brief Ask qpud if the current backend is a simulator
/// @brief Return true if the current backend is a simulator
/// @return
bool isSimulator() override { return false; }

/// @brief Ask qpud if the current backend supports conditional feedback
/// @brief Return true if the current backend supports conditional feedback
bool supportsConditionalFeedback() override { return false; }

/// Provide the number of shots
Expand Down
26 changes: 0 additions & 26 deletions runtime/cudaq/platform/qpud/CMakeLists.txt

This file was deleted.

132 changes: 0 additions & 132 deletions runtime/cudaq/platform/qpud/DefaultQPUDQuantumPlatform.cpp

This file was deleted.

2 changes: 1 addition & 1 deletion runtime/cudaq/platform/quantum_platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class quantum_platform {
// enqueueAsyncObserveTask(const std::size_t qpu_id, ObserveTask &t);

// This method is the hook for the kernel rewrites to invoke
// quantum kernels on the asynchronously executing qpud daemon process.
// quantum kernels.
void launchKernel(std::string kernelName, void (*kernelFunc)(void *),
void *args, std::uint64_t voidStarSize,
std::uint64_t resultOffset);
Expand Down
26 changes: 0 additions & 26 deletions runtime/qpud-client/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit a48f153

Please sign in to comment.