mirror of
https://github.com/microsoft/mscclpp.git
synced 2026-05-12 01:10:22 +00:00
Fix assert declaration & add a compile test (#303)
This commit is contained in:
@@ -17,8 +17,8 @@
|
||||
extern "C" __device__ void __assert_fail(const char *__assertion, const char *__file, unsigned int __line,
|
||||
const char *__function);
|
||||
#else // !defined(MSCCLPP_DEVICE_HIP)
|
||||
extern "C" __device__ void __assert_fail(const char *__assertion, const char *__file, unsigned int __line,
|
||||
const char *__function) __THROW;
|
||||
extern "C" __host__ __device__ void __assert_fail(const char *__assertion, const char *__file, unsigned int __line,
|
||||
const char *__function) __THROW;
|
||||
#endif // !defined(MSCCLPP_DEVICE_HIP)
|
||||
#endif // NDEBUG
|
||||
|
||||
|
||||
@@ -10,4 +10,5 @@ target_sources(unit_tests PRIVATE
|
||||
socket_tests.cc
|
||||
utils_tests.cc
|
||||
utils_internal_tests.cc
|
||||
compile_tests.cu
|
||||
)
|
||||
|
||||
11
test/unit/compile_tests.cu
Normal file
11
test/unit/compile_tests.cu
Normal file
@@ -0,0 +1,11 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#undef NDEBUG
|
||||
#include <assert.h>
|
||||
|
||||
#include <mscclpp/poll_device.hpp>
|
||||
|
||||
TEST(CompileTest, Assert) { assert(true); }
|
||||
Reference in New Issue
Block a user