[Mlir-commits] [llvm] [mlir] [mlir python] Port Python core code to nanobind. (PR #118583)
Stella Laurenzo
llvmlistbot at llvm.org
Wed Dec 11 19:53:09 PST 2024
================
@@ -205,14 +316,13 @@ class PyDenseArrayAttribute : public PyConcreteAttribute<DerivedT> {
EltTy dunderNext() {
// Throw if the index has reached the end.
if (nextIndex >= mlirDenseArrayGetNumElements(attr.get()))
- throw py::stop_iteration();
+ throw nb::stop_iteration();
----------------
stellaraccident wrote:
I wish this hadn't been cargo culted from pybind. Exceptions as control flow perform badly. In hot paths on other projects, I did something lower level vs throwing, but better to just switch in kind for now.
https://github.com/llvm/llvm-project/pull/118583
More information about the Mlir-commits
mailing list