Skip to content
Merged
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ size_t AnchorGeneratorPlugin::getWorkspaceSize(int max_batch_size) const
return 0;
}

#ifdef _WIN32
#if defined(CUDA_VERSION) && CUDA_VERSION >= 13000 || defined(_WIN32)
template <typename T>
__global__ void GenAnchors(T* out,
const T* aspect_ratios,
Expand Down Expand Up @@ -233,7 +233,7 @@ int AnchorGeneratorPlugin::enqueue_impl(int batch_size,
const T* aspect_ratios_device = static_cast<const T*>(aspect_ratios_device_);
const T* stride_device = static_cast<const T*>(stride_device_);
const T* variances_device = static_cast<const T*>(variances_device_);
#ifdef _WIN32
#if defined(CUDA_VERSION) && CUDA_VERSION >= 13000 || defined(_WIN32)
GenAnchors<T><<<gen_anchor_grid, block, 0, stream>>>(anchors,
aspect_ratios_device,
aspect_ratios_.size(),
Expand All @@ -258,7 +258,7 @@ int AnchorGeneratorPlugin::enqueue_impl(int batch_size,
offset_);
#endif
const int var_grid = (box_num_ * 4 + block - 1) / block;
#ifdef _WIN32
#if defined(CUDA_VERSION) && CUDA_VERSION >= 13000 || defined(_WIN32)
SetVariance<T><<<var_grid, block, 0, stream>>>(
vars, variances_device, variances_.size(), box_num_ * 4);
#else
Expand Down Expand Up @@ -592,7 +592,7 @@ int AnchorGeneratorPluginDynamic::enqueue_impl(
const T* aspect_ratios_device = static_cast<const T*>(aspect_ratios_device_);
const T* stride_device = static_cast<const T*>(stride_device_);
const T* variances_device = static_cast<const T*>(variances_device_);
#ifdef _WIN32
#if defined(CUDA_VERSION) && CUDA_VERSION >= 13000 || defined(_WIN32)
GenAnchors<T><<<gen_anchor_grid, block, 0, stream>>>(anchors,
aspect_ratios_device,
aspect_ratios_.size(),
Expand All @@ -617,7 +617,7 @@ int AnchorGeneratorPluginDynamic::enqueue_impl(
offset_);
#endif
const int var_grid = (box_num * 4 + block - 1) / block;
#ifdef _WIN32
#if defined(CUDA_VERSION) && CUDA_VERSION >= 13000 || defined(_WIN32)
SetVariance<T><<<var_grid, block, 0, stream>>>(
vars, variances_device, variances_.size(), box_num * 4);
#else
Expand Down Expand Up @@ -894,7 +894,7 @@ int PIRAnchorGeneratorPluginDynamic::enqueue_impl(
const T* aspect_ratios_device = static_cast<const T*>(aspect_ratios_device_);
const T* stride_device = static_cast<const T*>(stride_device_);
const T* variances_device = static_cast<const T*>(variances_device_);
#ifdef _WIN32
#if defined(CUDA_VERSION) && CUDA_VERSION >= 13000 || defined(_WIN32)
GenAnchors<T><<<gen_anchor_grid, block, 0, stream>>>(anchors,
aspect_ratios_device,
aspect_ratios_.size(),
Expand All @@ -919,7 +919,7 @@ int PIRAnchorGeneratorPluginDynamic::enqueue_impl(
offset_);
#endif
const int var_grid = (box_num * 4 + block - 1) / block;
#ifdef _WIN32
#if defined(CUDA_VERSION) && CUDA_VERSION >= 13000 || defined(_WIN32)
SetVariance<T><<<var_grid, block, 0, stream>>>(
vars, variances_device, variances_.size(), box_num * 4);
#else
Expand Down
Loading