Re-enable some of the recently disabled cuda tests#7873
Re-enable some of the recently disabled cuda tests#7873RyanUnderhill merged 11 commits intomasterfrom
Conversation
| CUDAExecutionProviderInfo epi; | ||
| epi.device_id = 0; | ||
| EXPECT_TRUE(session_object.RegisterExecutionProvider(std::make_unique<CUDAExecutionProvider>(epi)).IsOK()); | ||
| EXPECT_TRUE(session_object.RegisterExecutionProvider(DefaultCudaExecutionProvider()).IsOK()); |
There was a problem hiding this comment.
It is good. But if you help us change it to
ASSERT_STATUS_OK(session_object.RegisterExecutionProvider(DefaultCudaExecutionProvider());It will be even better.
There was a problem hiding this comment.
It is even better now
|
I put a way to call cleanup functions inside of test_main.cc, but not sure if there's a good place to put the prototype for 'CallOnTestExit'. Currently the prototype is just declared where it is used. |
|
|
||
| // We keep a list of functions to call on exit before we destroy the OrtEnv. | ||
| // This is needed to do any cleanup that must be done before the OrtEnv gets destroyed and all shared providers get unloaded. | ||
| static std::vector<std::function<void()>> exit_functions; |
There was a problem hiding this comment.
Does it make our unit test program too complicated?
There was a problem hiding this comment.
If unit tests need special handlings like this, probably end users need such things too. It doesn't look good.
There was a problem hiding this comment.
I don't think so, but since we love using global variables, we need a way to clean things up before we destroy the OrtEnv.
|
The single test failure is a known one occurring without my changes. |
Description: As promised, this re-enables some of the disabled cuda tests due to the shared cuda provider changes
There are still 3 files to go after this change