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

Clean up types in tests, in preparation for changing APIs. #3904

Merged
merged 4 commits into from
Feb 18, 2025
Merged

Conversation

csarofeen
Copy link
Collaborator

In tests auto output type when possible, remove c10::IValue for inputs where possible.

@csarofeen
Copy link
Collaborator Author

!test

KernelExecutor ke;
ke.compile(&fusion, aten_inputs);
ke.compile(&fusion, {t0, t1});
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd prefer the old style, which would make it easier to change the arguments, whereas in the new code all of the compile, run and validate calls need to be maintained consistently. What is the motivation of this change?

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'm about to change all the function signatures to be KernelArgumentHolder everywhere. I didn't want to send that PR changing them all simultaneously as it'd be hard to dig out the change of the API relative to the changes of the tests. This will temporarily make our tests more impervious to that type change when it comes.

Copy link
Collaborator

@wujingyue wujingyue left a comment

Choose a reason for hiding this comment

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

I tend to be careful with auto. auto in our codebase slowed down my rampup quite a lot. That said, using it more extensively in tests for repetitive functions like runFusionWithInputs sounds OK to me.

@csarofeen
Copy link
Collaborator Author

@wujingyue I 100% agree, I'm doing it because I'm about to change both input and output types to nvFuser to be consistently KernelArgHolder. Once changed we could revert them back to a consistent type. It's mostly for convenience for this change.

@csarofeen
Copy link
Collaborator Author

!test

@csarofeen
Copy link
Collaborator Author

!test

@csarofeen
Copy link
Collaborator Author

H100 runners are not working at the moment. I didn't see any failures locally on H100, merging.

@csarofeen csarofeen merged commit b113c24 into main Feb 18, 2025
46 of 54 checks passed
@csarofeen csarofeen deleted the c10_tests branch February 18, 2025 19:00
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.

3 participants