Skip to content

Commit d93971a

Browse files
committed
make wrong batch size into an exception
1 parent a0278bd commit d93971a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

HeterogeneousCore/SonicTriton/src/TritonClient.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,8 @@ unsigned TritonClient::batchSize() const { return batchMode_ == TritonBatchMode:
263263
bool TritonClient::setBatchSize(unsigned bsize) {
264264
if (batchMode_ == TritonBatchMode::Rectangular) {
265265
if (bsize > maxOuterDim_) {
266-
edm::LogWarning(fullDebugName_) << "Requested batch size " << bsize << " exceeds server-specified max batch size "
267-
<< maxOuterDim_ << ". Batch size will remain as " << outerDim_;
266+
throw TritonException("LocalFailure")
267+
<< "Requested batch size " << bsize << " exceeds server-specified max batch size " << maxOuterDim_ << ".";
268268
return false;
269269
} else {
270270
outerDim_ = bsize;

0 commit comments

Comments
 (0)