-
Notifications
You must be signed in to change notification settings - Fork 25.6k
port all JIT tests to gtest #45264
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
port all JIT tests to gtest #45264
Conversation
[ghstack-poisoned]
💊 CI failures summary and remediationsAs of commit 6575c3a (more details on the Dr. CI page):
🕵️ 1 new failure recognized by patternsThe following CI failures do not appear to be due to upstream breakages:
|
Differential Revision: [D23901392](https://our.internmc.facebook.com/intern/diff/D23901392) [ghstack-poisoned]
cc @csarofeen: heads up that this PR changes the GPU fuser tests to be registered through gtest only. So running cpp tests through the |
Context for why we are porting to gtest in: #45018. This PR completes the process of porting and removes unused files/macros. Differential Revision: [D23901392](https://our.internmc.facebook.com/intern/diff/D23901392) [ghstack-poisoned]
Context for why we are porting to gtest in: #45018. This PR completes the process of porting and removes unused files/macros. Differential Revision: [D23901392](https://our.internmc.facebook.com/intern/diff/D23901392) [ghstack-poisoned]
IIUC, CI would still run cpp tests, but jut not via the python script? |
Correct, our upstream CI runs the JIT tests here: https://github.com/pytorch/pytorch/blob/master/.jenkins/pytorch/test.sh#L200. Adding a similar line in your CI should be sufficient. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looks good, my only question is about thread_init_test.cpp
(see below).
#include <ATen/ATen.h> | ||
#include <ATen/Parallel.h> | ||
#include <test/cpp/jit/test_base.h> | ||
#include <test/cpp/tensorexpr/test_base.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks kinda awkward. Why does this depend on something in tensorexpr now? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test depends on some of the gtest polyfills in test_base.h
. Since I am deleting the JIT's version, I included the tensorexpr
copy to avoid editing this test too much. I think it wouldn't be too hard to either 1) include gtest or 2) just define the polyfills here, but I didn't want to make this PR bigger in non-JIT places.
ASSERT_FALSE(stack[2].toBool()); | ||
} | ||
|
||
// TODO: These tests weren't doing anything. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these tests pass if we enable them now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There were a few tests that weren't running, because they were defined in a test file but not registered in tests.h
. If they are commented out, it's because they failed when I re-enabled them :(
Context for why we are porting to gtest in: #45018. This PR completes the process of porting and removes unused files/macros. Differential Revision: [D23901392](https://our.internmc.facebook.com/intern/diff/D23901392) [ghstack-poisoned]
@suo you mentioned a conflict, can we give you a hand? CC @jjsjann123 |
no worries, I just rebased and fixed the conflicts manually. Thanks! |
Stack from ghstack:
Context for why we are porting to gtest in: #45018.
This PR completes the process of porting and removes unused files/macros.
Differential Revision: D23901392