Skip to content

Conversation

makslevental
Copy link
Contributor

WIP

@makslevental makslevental changed the title [MLIR][Python] make Py* types public API [MLIR][Python][NFC] move Py* types Aug 27, 2025
@makslevental makslevental force-pushed the users/makslevental/deprecate-mlir_subclass branch 8 times, most recently from 7eb55a3 to 06eb0f6 Compare August 28, 2025 01:04
@makslevental
Copy link
Contributor Author

@makslevental makslevental force-pushed the users/makslevental/deprecate-mlir_subclass branch from 06eb0f6 to 7df100f Compare August 28, 2025 01:30
@makslevental makslevental force-pushed the users/makslevental/deprecate-mlir_subclass branch from 7df100f to cbcfaee Compare August 28, 2025 01:31
mlirAttributes.reserve(nb::len(attributes));
for (auto attribute : attributes) {
mlirAttributes.push_back(pyTryCast<PyAttribute>(attribute));
[](const nb::sequence &py_values, DefaultingPyMlirContext ctx) {
Copy link
Contributor

@rolfmorel rolfmorel Aug 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Random spot check: nb::list to nb::sequence - nice!

if (is_true < 0) {
throw nb::python_error();
}
values.push_back(is_true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Random spot check: you're pushing is_true here, which I believe is a Boolean value and not the attribute element itself. I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants