CUDA-Q Adapter v0.1
|
Ready to use the MQSS CUDA-Q Adapter? This guide will help you get started.
Since the MQSS CUDA-Q Adapter is a plugin of the NVIDIA CUDA-Quantum (CUDA-Q) programming interface, your system must contain an installation of CUDA-Q as a main prerequisite.
We recommend to follow the instructions of installation described in the following link: CUDA-Q Documentation
Clone the MQSS CUDA-Q Adapter:
Change into the project directory:
Run the following command to update the sub-modules of the project:
Run the following script to configure this project and set up the MQSS CUDA-Q Adapter:
Dev Containers (short for Development Containers) are an environment configuration that allows developers to create a consistent, isolated environment for development, testing, and deployment. They are typically used in conjunction with Visual Studio Code (VS Code) and Docker to ensure that the development environment is the same across all team members, regardless of their host machine or operating system.
The previous steps creates an isolated environment where you can tests this project. The project is located:
Building the project requires a C++ compiler supporting C11 and a minimum CMake version of 3.19. The example devices and the tests require a C++ compiler supporting C++17 and C++20 dialects.
The script generate_and_apply_patch.sh
clone the source code of CUDA-Q and fetch also the MQSS CUDA-Q Adapter. You need to rebuild the entire CUDA-Q and install. After this the CUDA-Q compiler will show mqMQP
when running nvq++ --list-targets
.
In the following, we describe each of the arguments accepted by build.sh
.
--jobs
(optional) The number of jobs utilized to configure and compile this project. If not specified, a single job is used to compile the project.--mlir-dir
Path of your MLIR installation. E.g., /opt/llvm/lib/cmake/mlir/
--clang-dir
Path of your Clang installation.--llvm-dir
Path of your LLVM installation.After the installation you can verify if the installation was successful, by running the following script:
You can see listed the targets mqssMQP
corresponding to the MQP access to the MQSS.
For the information to be displayed correctly in the documentation, it is essential that the comments follow the format required by Doxygen. Below you find some tags, that are commonly used within the documentation of a function:
@brief
For a brief, one-line description of the function. Should always be provided.@details
For a longer, detailed description of the function.@param
To explain the usage of a parameter. Should be provided for each parameter.@return
To explain the return value. Should be provided if the function returns a value.The documentation is generated using Doxygen, which is seamlessly integrated into the CMake build system.
The documentation can be built using the build_doc.sh
script.
The generated webpage can be inspected by opening the file in docs/html/index.html
in the CMake build directory.
The generated webpage also contains four static sites, namely the main page, the support page, the FAQ page, and this development guide. The respective markdown files that serve as the source for those sites are contained in docs/
where index.md
contains the content of the main page.
In order to include source files to be listed among the menu item API Reference/Files
, these files must be marked as documented. This is accomplished by adding a comment like the following to the top of the file. Right now, this is done for all files in the include directory.