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

Adapt one-iter tools #152

Closed
wants to merge 1 commit into from
Closed
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
5 changes: 5 additions & 0 deletions DIOPI-IMPL/torch/functions_mmcv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ extern "C" {

diopiError_t diopiNmsMmcv(diopiContextHandle_t ctx, diopiTensorHandle_t *out, diopiConstTensorHandle_t dets, diopiConstTensorHandle_t scores,
double iouThreshold, int64_t offset) {
// fix just for one-iter-test tools on cuda device with DIPU_MOCK_CUDA=False
const char *mode = std::getenv("DIPU_MOCK_CUDA");
if (mode != nullptr && (strcmp(mode, "False") == 0)) {
return diopiErrorOccurred;
}
impl::aten::setCurCtx(ctx);
auto atDets = impl::aten::buildATen(dets);
auto atScores = impl::aten::buildATen(scores);
Expand Down