Skip to content
Open
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
2 changes: 2 additions & 0 deletions sam2/csrc/connected_components.cu
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ std::vector<torch::Tensor> get_connected_componnets(
AT_ASSERTM((H % 2) == 0, "height must be an even number");
AT_ASSERTM((W % 2) == 0, "width must be an even number");

at::cuda::CUDAGuard guard(inputs_.device());

// label must be uint32_t
auto label_options =
torch::TensorOptions().dtype(torch::kInt32).device(inputs.device());
Expand Down