Comments (5)
Thank you @Zhaoyilunnn, happy to help however you might like. In general, as you're making progress I'd love to chat to understand better what you are trying to do and how to enable it.
from qe-compiler.
An obfuscated version of our top-level CMakeLists to integrate the project
cmake_minimum_required(VERSION 3.25) project(target-compiler) set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/build_tools/cmake ${CMAKE_MODULE_PATH}) set(QSSC_SYSTEMS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/targets/systems" CACHE STRING "The directory containing the common systems" ) option(QSSC_WITH_MOCK_TARGET "Available targets include the built-in mock target" ON) option(QSSC_WITH_SYSTEM_CONFIG "Use system_config to retrieve configuration for targets" OFF) option(QSSC_BUILD_DOCS "Build the documentation for the compiler" ON) # List of directories containing compiler targets. Subtargets should be # listed first so that they are built before top-level targets set(QSSC_TARGET_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/targets/systems/YourTarget; CACHE PATH "List of directories containing compiler targets." ) set(QSSC_TARGET_TEST_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/targets/systems/YourTarget/test; CACHE PATH "List of directories containing compiler LIT test suites." ) set(QSSC_TARGET_PYTHON_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/targets/systems/YourTarget/python_lib/ CACHE PATH "List of directories containing compiler target python additions." ) # Build type if (NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug) endif() set(CMAKE_COMPILE_WARNING_AS_ERROR ON) # Here is the submodule which we integrate through # the Cmake build system with add_subdirectory(qe-compiler)
In this way our internal project contains our targets in a very similar way to https://github.com/openqasm/qe-compiler/tree/main/targets/systems/mock with a top-level cmake file which we use to generate internal binaries. The rough project structure is
target-compiler/
qe-compiler/
(submodule)targets/systems/YourTarget/
CMakeLists.txt
We could be very interested in enabling the pathway to remove the
qe-compiler
submodule and replace it with a Conan dependency.
@taalexander Thanks a lot for your example CMakeLists.txt, actually I gave up making qe-compiler a conan package and adopted a similar top-level CMakeLists.txt ^_^
I am still in the progress of finding the correct way to make it a Conan package. I will make a PR once I figure it out
from qe-compiler.
I made some changes to existing config files main...Zhaoyilunnn:qe-compiler:zhaoyilun-local-conan-package
Then a local conan package can be built through conan create . zhaoyilun/qe-compiler --build=outdated -pr:h default -pr:b default -o qss-compiler:pythonlib=False
from qe-compiler.
Hi @Zhaoyilunnn, thank you for writing up this issue. The qe-compiler is still in its infancy of being an opensource project and we certainly have a lot of work to do in migrating documentation that needs to be resumed.
Note that I can seamlessly build qe-compiler locally, but I just cannot build a conan package of it and then make my own project dependent on qe-compiler.
In particular, we have not attempted this path to development yet, but are very interested in this. Internally, we are using the project as a submodule with integration through the Cmake build system.
I made some changes to existing config files main...Zhaoyilunnn:qe-compiler:zhaoyilun-local-conan-package
Then a local conan package can be built through conan create . zhaoyilun/qe-compiler --build=outdated -pr:h default -pr:b default -o qss-compiler:pythonlib=False
We would be very interested if you could make a draft PR demonstrating this work so that we could discuss how it might be incorporated in-tree.
from qe-compiler.
An obfuscated version of our top-level CMakeLists to integrate the project
cmake_minimum_required(VERSION 3.25)
project(target-compiler)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/build_tools/cmake ${CMAKE_MODULE_PATH})
set(QSSC_SYSTEMS_DIR
"${CMAKE_CURRENT_SOURCE_DIR}/targets/systems"
CACHE STRING
"The directory containing the common systems"
)
option(QSSC_WITH_MOCK_TARGET "Available targets include the built-in mock target" ON)
option(QSSC_WITH_SYSTEM_CONFIG "Use system_config to retrieve configuration for targets" OFF)
option(QSSC_BUILD_DOCS "Build the documentation for the compiler" ON)
# List of directories containing compiler targets. Subtargets should be
# listed first so that they are built before top-level targets
set(QSSC_TARGET_DIRS
${CMAKE_CURRENT_SOURCE_DIR}/targets/systems/YourTarget;
CACHE PATH
"List of directories containing compiler targets."
)
set(QSSC_TARGET_TEST_DIRS
${CMAKE_CURRENT_SOURCE_DIR}/targets/systems/YourTarget/test;
CACHE PATH
"List of directories containing compiler LIT test suites."
)
set(QSSC_TARGET_PYTHON_DIRS
${CMAKE_CURRENT_SOURCE_DIR}/targets/systems/YourTarget/python_lib/
CACHE PATH
"List of directories containing compiler target python additions."
)
# Build type
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug)
endif()
set(CMAKE_COMPILE_WARNING_AS_ERROR ON)
# Here is the submodule which we integrate through
# the Cmake build system with
add_subdirectory(qe-compiler)
In this way our internal project contains our targets in a very similar way to https://github.com/openqasm/qe-compiler/tree/main/targets/systems/mock with a top-level cmake file which we use to generate internal binaries. The rough project structure is
target-compiler/
qe-compiler/
(submodule)targets/systems/YourTarget/
CMakeLists.txt
We could be very interested in enabling the pathway to remove the qe-compiler
submodule and replace it with a Conan dependency.
from qe-compiler.
Related Issues (20)
- Default Conan profile on Ubuntu 22 uses libstdc++ instead of libstdc++11. HOT 1
- Expose `compile()` via a new library based on `QSSCLib`
- VariableEliminationPass (quir-eliminate-variables) causing test failures on M1 HOT 2
- libzip build issue on vanilla Ubuntu 22.04 HOT 2
- CMake project target CXX build issue on vanilla Ubuntu 22.04 HOT 3
- Building conan cache is slow on vanilla Ubuntu 22.04 HOT 2
- Compiler CLI --direct and python_lib compile_str() doesn't work HOT 1
- Lowering to Pulse Dialect HOT 2
- Python bindings to QSSC AST/IR
- [feature request] alternative to --config CLI flag
- Segmentation fault while running unit tests on macOS Ventura / arm64 / Xcode 14.3 HOT 6
- Upgrade MLIR interfaces to work with LLVM 16.
- Rename from qss (quantum systems software) to qe (quantum engine) - compiler
- ThreadedCompilationManager is not threadsafe for multiple concurrent calls
- Parametric performance regression with update to LLVM 17
- Need to add Codeowners file
- Mock tests are failing with debug builds
- Add support for operation precedance in expression
- Failure to parse classical expressions with binary and unary operations combined
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qe-compiler.