提交 5baa529e 编写于 作者: L Luo Tao

fix compiler error of profiler_test in ONLY_CPU mode

上级 5a8b05f0
......@@ -13,7 +13,9 @@ See the License for the specific language governing permissions and
limitations under the License. */
#include "paddle/fluid/platform/profiler.h"
#ifdef PADDLE_WITH_CUDA
#include "cuda_runtime.h"
#endif
#include "gtest/gtest.h"
TEST(Event, CpuElapsedTime) {
......@@ -159,6 +161,7 @@ TEST(RecordEvent, RecordEvent) {
DisableProfiler(EventSortingKey::kTotal, "/tmp/profiler");
}
#ifdef PADDLE_WITH_CUDA
TEST(TMP, stream_wait) {
cudaStream_t stream;
cudaStreamCreate(&stream);
......@@ -166,3 +169,4 @@ TEST(TMP, stream_wait) {
cudaStreamSynchronize(stream);
cudaStreamSynchronize(stream);
}
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册