Skip to content

Commit

Permalink
Merge pull request #8959 from tier4/awsim-stable-patch-20240926
Browse files Browse the repository at this point in the history
fix(trtexec_vendor, tensorrt_yolo): fix build error
  • Loading branch information
shmpwk authored Sep 26, 2024
2 parents 126be79 + ecd89f7 commit f7a1c8d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 127 deletions.
88 changes: 0 additions & 88 deletions common/trtexec_vendor/CMakeLists.txt

This file was deleted.

5 changes: 0 additions & 5 deletions common/trtexec_vendor/env-hooks/trtexec_vendor.sh.in

This file was deleted.

20 changes: 0 additions & 20 deletions common/trtexec_vendor/package.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ namespace cuda
inline void check_error(const ::cudaError_t e, const char * f, int n)
{
if (e != ::cudaSuccess) {
std::stringstream s;
::std::stringstream s;
s << ::cudaGetErrorName(e) << " (" << e << ")@" << f << "#L" << n << ": "
<< ::cudaGetErrorString(e);
throw std::runtime_error{s.str()};
throw ::std::runtime_error{s.str()};
}
}

Expand All @@ -69,13 +69,13 @@ struct deleter
};

template <typename T>
using unique_ptr = std::unique_ptr<T, deleter>;
using unique_ptr = ::std::unique_ptr<T, deleter>;

template <typename T>
typename std::enable_if<std::is_array<T>::value, cuda::unique_ptr<T>>::type make_unique(
const std::size_t n)
typename ::std::enable_if<::std::is_array<T>::value, cuda::unique_ptr<T>>::type make_unique(
const ::std::size_t n)
{
using U = typename std::remove_extent<T>::type;
using U = typename ::std::remove_extent<T>::type;
U * p;
CHECK_CUDA_ERROR(::cudaMalloc(reinterpret_cast<void **>(&p), sizeof(U) * n));
return cuda::unique_ptr<T>{p};
Expand Down Expand Up @@ -107,7 +107,7 @@ inline T * get_next_ptr(size_t num_elem, void *& workspace, size_t & workspace_s
{
size_t size = get_size_aligned<T>(num_elem);
if (size > workspace_size) {
throw std::runtime_error("Workspace is too small!");
throw ::std::runtime_error("Workspace is too small!");
}
workspace_size -= size;
T * ptr = reinterpret_cast<T *>(workspace);
Expand Down
14 changes: 7 additions & 7 deletions perception/tensorrt_yolo/lib/include/cuda_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ namespace cuda
void check_error(const ::cudaError_t e, const char * f, int n)
{
if (e != ::cudaSuccess) {
std::stringstream s;
::std::stringstream s;
s << ::cudaGetErrorName(e) << " (" << e << ")@" << f << "#L" << n << ": "
<< ::cudaGetErrorString(e);
throw std::runtime_error{s.str()};
throw ::std::runtime_error{s.str()};
}
}

Expand All @@ -69,13 +69,13 @@ struct deleter
void operator()(void * p) const { CHECK_CUDA_ERROR(::cudaFree(p)); }
};
template <typename T>
using unique_ptr = std::unique_ptr<T, deleter>;
using unique_ptr = ::std::unique_ptr<T, deleter>;

template <typename T>
typename std::enable_if<std::is_array<T>::value, cuda::unique_ptr<T>>::type make_unique(
const std::size_t n)
typename ::std::enable_if<::std::is_array<T>::value, cuda::unique_ptr<T>>::type make_unique(
const ::std::size_t n)
{
using U = typename std::remove_extent<T>::type;
using U = typename ::std::remove_extent<T>::type;
U * p;
CHECK_CUDA_ERROR(::cudaMalloc(reinterpret_cast<void **>(&p), sizeof(U) * n));
return cuda::unique_ptr<T>{p};
Expand Down Expand Up @@ -107,7 +107,7 @@ inline T * get_next_ptr(size_t num_elem, void *& workspace, size_t & workspace_s
{
size_t size = get_size_aligned<T>(num_elem);
if (size > workspace_size) {
throw std::runtime_error("Workspace is too small!");
throw ::std::runtime_error("Workspace is too small!");
}
workspace_size -= size;
T * ptr = reinterpret_cast<T *>(workspace);
Expand Down

0 comments on commit f7a1c8d

Please sign in to comment.