You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consult the security policy. If reporting a security vulnerability, do not report the bug using this form. Use the process described in the policy to report the issue.
Make sure you've read the documentation. Your issue may be addressed there.
Search the issue tracker to verify that this hasn't already been reported. +1 or comment there if it has.
If possible, make a PR with a failing test to give us a starting point to work on!
Describe the bug
When trying to create many kernels in parallel, we accidentally try to register our MLIR dialect multiple times at runtime.
Steps to reproduce the bug
auto build_kernel() {
auto kernel = cudaq::make_kernel();
auto q = kernel.qalloc();
kernel.x(q);
return kernel;
}
TEST(testRepro, minimalRepro) {
#pragma omp parallel
for (size_t idx = 0; idx < 10; ++idx) {
auto kernel = build_kernel();
auto result = cudaq::sample(kernel);
auto now = std::chrono::system_clock::now();
std::time_t time = std::chrono::system_clock::to_time_t(now);
std::cout << std::ctime(&time);
}
}
Required prerequisites
Describe the bug
When trying to create many kernels in parallel, we accidentally try to register our MLIR dialect multiple times at runtime.
Steps to reproduce the bug
test: /home/.llvm-project/mlir/lib/Pass/PassRegistry.cpp:102: void mlir::registerPassPipeline(llvm::StringRef, llvm::StringRef, const PassRegistryFunction&, std::function<void(llvm::function_ref<void(const mlir::detail::PassOptions&)>)>): Assertion `inserted && "Pass pipeline registered multiple times"' failed.
Expected behavior
We'd expect output like the following, which indicates all kernels were processed and executed in parallel
Is this a regression? If it is, put the last known working version (or commit) here.
Not a regression
Environment
Suggestions
No response
The text was updated successfully, but these errors were encountered: