|
1 | 1 | #!/bin/bash
|
2 |
| -# Copyright 2021-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
| 2 | +# Copyright 2021-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
3 | 3 | #
|
4 | 4 | # Redistribution and use in source and binary forms, with or without
|
5 | 5 | # modification, are permitted provided that the following conditions
|
@@ -66,6 +66,11 @@ for MODEL in \
|
66 | 66 | (cd models/${MODEL}_test && \
|
67 | 67 | sed -i 's/_float32_float32_float32/&_test/' config.pbtxt && \
|
68 | 68 | echo -e "\ninstance_group { count: ${INSTANCE_COUNT} }" >> config.pbtxt) && \
|
| 69 | + # Enable session.use_device_allocator_for_initializers |
| 70 | + cp -r models/${MODEL}_test models/${MODEL}_session_config && \ |
| 71 | + (cd models/${MODEL}_session_config && \ |
| 72 | + sed -i 's/_float32_test/_float32_session_config/' config.pbtxt && \ |
| 73 | + echo "parameters: { key: \"session.use_device_allocator_for_initializers\" value: { string_value: \"1\" }}" >> config.pbtxt) && \ |
69 | 74 | # CUDA EP optimization params
|
70 | 75 | cp -r models/${MODEL}_test models/${MODEL}_cuda_config && \
|
71 | 76 | (cd models/${MODEL}_cuda_config && \
|
@@ -160,6 +165,12 @@ for MODEL in \
|
160 | 165 |
|
161 | 166 | set +e
|
162 | 167 |
|
| 168 | + grep "Configuring 'session.use_device_allocator_for_initializers' to '1'" $SERVER_LOG |
| 169 | + if [ $? -ne 0 ]; then |
| 170 | + echo -e "\n***\n*** Failed. Expected Configuring 'session.use_device_allocator_for_initializers' to '1'\n***" |
| 171 | + RET=1 |
| 172 | + fi |
| 173 | + |
163 | 174 | grep "TensorRT Execution Accelerator is set for '${MODEL}_trt'" $SERVER_LOG
|
164 | 175 | if [ $? -ne 0 ]; then
|
165 | 176 | echo -e "\n***\n*** Failed. Expected TensorRT Execution Accelerator is set for '${MODEL}_trt'\n***"
|
|
0 commit comments