Skip to content

Commit

Permalink
Add building gtest for OpenCL in GPU build
Browse files Browse the repository at this point in the history
  • Loading branch information
echuraev committed Nov 23, 2022
1 parent d71de34 commit e81ae5e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/cpp-runtime/opencl/opencl_texture_pool_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ using namespace tvm::runtime::cl;
// get and check internal state of class Pool
class PoolWrapper : public Pool2D {
public:
inline size_t FreeListSize() const { return free_list_.size(); }
inline size_t AllocatedListSize() const { return allocated_.size(); }
inline std::pair<size_t, size_t> FreeListItemSize(size_t idx) const {
return std::make_pair(free_list_[idx].x, free_list_[idx].y);
inline int FreeListSize() const { return static_cast<int>(free_list_.size()); }
inline int AllocatedListSize() const { return static_cast<int>(allocated_.size()); }
inline std::pair<int, int> FreeListItemSize(size_t idx) const {
return std::make_pair(static_cast<int>(free_list_[idx].x), static_cast<int>(free_list_[idx].y));
}
inline std::pair<size_t, size_t> AllocatedListItemSize(size_t idx) const {
return std::make_pair(allocated_[idx].x, allocated_[idx].y);
inline std::pair<int, int> AllocatedListItemSize(size_t idx) const {
return std::make_pair(static_cast<int>(allocated_[idx].x), static_cast<int>(allocated_[idx].y));
}
};

Expand Down
1 change: 1 addition & 0 deletions tests/scripts/task_config_build_gpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ echo set\(USE_CUDA ON\) >> config.cmake
echo set\(USE_VULKAN ON\) >> config.cmake
echo set\(USE_OPENGL ON\) >> config.cmake
echo set\(USE_OPENCL ON\) >> config.cmake
echo set\(USE_OPENCL_GTEST /googletest\) >> config.cmake
echo set\(USE_MICRO_STANDALONE_RUNTIME ON\) >> config.cmake
echo set\(USE_LLVM \"/usr/bin/llvm-config-9 --link-static\"\) >> config.cmake
echo set\(USE_NNPACK ON\) >> config.cmake
Expand Down

0 comments on commit e81ae5e

Please sign in to comment.