Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pytest - MLIR binary ops #144

Closed
wants to merge 2 commits into from
Closed

Conversation

adam-smnk
Copy link
Collaborator

No description provided.

@adam-smnk
Copy link
Collaborator Author

@slyalin I took test_add.py as my test template. So far, when I run my test, I end up with:
AssertionError: Operation mlir::binary_ops type doesn't exist in provided graph
Not sure what I'm missing.

@rengolin
Copy link
Collaborator

Can you also add the test from #139, but change input_shape to 1024 and output_shape to 128 and changed all instances of 10 and 1 to input_shape and output_shape respectively?

@adam-smnk
Copy link
Collaborator Author

Not sure what I'm missing.

Okay, I think I get it now. This kind looks for equivalent type of node in the input graph. For this test, I'm interested whether the model can run at all. So, I can probably set my return value mlir::binary_ops to None as it is checked before compile_model happens.

It would be nice if I could somehow run validation on MLIR but maybe we can leave that for later.

self.lhs_shape = lhs_shape
self.rhs_type = rhs_type
self.rhs_shape = rhs_shape
# TODO: test with static shapes for XSMM acceleration
Copy link
Owner

Choose a reason for hiding this comment

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

@mvafin, do we have a way to reshape a model in this infrastructure?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was thinking to just set dynamic_shapes=False for that but right now I have no idea if I can validate what kind of MLIR we generate.

@adam-smnk
Copy link
Collaborator Author

Existing tests provide already decent coverage, for the rest benchmarks are currently enough.
Closing for now.

@adam-smnk adam-smnk closed this Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants