Skip to content
Draft
Show file tree
Hide file tree
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 cpp/tests/unit_tests/thop/eagerMoeWorkspaceTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "tensorrt_llm/thop/moe/cutlass/eagerMoeWorkspace.h"
#include "tensorrt_llm/thop/moe/cutlass/eagerMoeWorkspaceScope.h"

#include <ATen/Context.h>
#include <ATen/cuda/CUDAContext.h>
#include <c10/cuda/CUDACachingAllocator.h>
#include <c10/cuda/CUDAGuard.h>
Expand Down Expand Up @@ -153,6 +154,8 @@ TEST(EagerMoeWorkspace, ReclamationRetriesAfterReleasingScratchUnderMemoryPressu
GTEST_SKIP() << "Uses native allocator quota and OOM counters";
}
constexpr int64_t kMiB = 1024 * 1024;
// Allocator quota queries require PyTorch's CUDA initialization.
at::globalContext().lazyInitDevice(c10::DeviceType::CUDA);
auto const device = c10::cuda::current_device();
auto const previousLimit = c10::cuda::CUDACachingAllocator::getMemoryFraction(device);
auto restoreLimit
Expand Down Expand Up @@ -205,6 +208,8 @@ TEST(EagerMoeWorkspace, ConservativeReservationOomStillAllowsSmallerActualDemand
GTEST_SKIP() << "Uses native allocator quota and OOM counters";
}
constexpr int64_t kMiB = 1024 * 1024;
// Allocator quota queries require PyTorch's CUDA initialization.
at::globalContext().lazyInitDevice(c10::DeviceType::CUDA);
auto const device = c10::cuda::current_device();
auto const previousLimit = c10::cuda::CUDACachingAllocator::getMemoryFraction(device);
auto restoreLimit
Expand Down
1 change: 1 addition & 0 deletions tests/unittest/_torch/executor/test_resource_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1263,6 +1263,7 @@ def _reload_ckpt_source(self, server_ckpt_source, request_ckpt_source):
peft_cache_config=self.create_peft_cache_config(),
lora_config=LoraConfig(lora_ckpt_source=server_ckpt_source),
model_config=self.model_config,
lora_model_config=_text_lora_model_config(self.model_config),
)
peft_cache_manager.impl = MagicMock()
peft_cache_manager.impl.is_task_cached.return_value = False
Expand Down
Loading