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

【paddle_test No.24】replace cc_test with paddle_test #61373

Merged
merged 23 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion paddle/fluid/memory/malloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ using phi::Allocation;
extern std::shared_ptr<Allocation> AllocShared(const platform::Place& place,
size_t size);

extern AllocationPtr Alloc(const platform::Place& place, size_t size);
TEST_API extern AllocationPtr Alloc(const platform::Place& place, size_t size);

extern uint64_t Release(const platform::Place& place);

Expand Down
16 changes: 9 additions & 7 deletions paddle/fluid/operators/detection/mask_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,19 @@ limitations under the License. */

#include <vector>

#include "paddle/utils/test_macros.h"

namespace paddle {
namespace operators {

void Poly2Mask(const float* ploy, int k, int h, int w, uint8_t* mask);
TEST_API void Poly2Mask(const float* ploy, int k, int h, int w, uint8_t* mask);

void Poly2Boxes(const std::vector<std::vector<std::vector<float>>>& polys,
float* boxes);
TEST_API void Poly2Boxes(
const std::vector<std::vector<std::vector<float>>>& polys, float* boxes);

void Polys2MaskWrtBox(const std::vector<std::vector<float>>& polygons,
const float* box,
int M,
uint8_t* mask);
TEST_API void Polys2MaskWrtBox(const std::vector<std::vector<float>>& polygons,
const float* box,
int M,
uint8_t* mask);
} // namespace operators
} // namespace paddle
11 changes: 7 additions & 4 deletions test/cpp/fluid/detection/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
cc_test(
mask_util_test
SRCS mask_util_test.cc
DEPS mask_util)
paddle_test(mask_util_test SRCS mask_util_test.cc)

if(WITH_ONNXRUNTIME AND WIN32)
# Copy onnxruntime for some c++ test in Windows, since the test will
# be build only in CI, so suppose the generator in Windows is Ninja.
copy_onnx(mask_util_test)
endif()