We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f786a7 commit 467b8d1Copy full SHA for 467b8d1
src/libtorch.cc
@@ -1995,7 +1995,10 @@ ModelInstanceState::SetInputTensors(
1995
1996
// The input must be in contiguous CPU/GPU memory.
1997
std::vector<std::pair<TRITONSERVER_MemoryType, int64_t>> alloc_perference;
1998
- if (device_.is_cpu()) {
+ // For 'KIND_MODEL', intput will always be in CPU as we don't have a way to
1999
+ // query the input types.
2000
+ if ((device_.is_cpu()) ||
2001
+ (Kind() == TRITONSERVER_INSTANCEGROUPKIND_MODEL)) {
2002
alloc_perference = {{TRITONSERVER_MEMORY_CPU_PINNED, 0},
2003
{TRITONSERVER_MEMORY_CPU, 0}};
2004
} else {
0 commit comments