Skip to content

Commit c4723a9

Browse files
committed
chore: Update README C++ code snippet
Signed-off-by: Dheeraj Peri <[email protected]>
1 parent af13839 commit c4723a9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ If you would like to build outside a docker container, please follow the section
3636
// Set input datatypes. Allowerd options torch::{kFloat, kHalf, kChar, kInt32, kBool}
3737
// Size of input_dtypes should match number of inputs to the network.
3838
// If input_dtypes is not set, default precision follows traditional PyT / TRT rules
39-
auto input = torch_tensorrt::CompileSpec::Input(dims, torch::kHalf)
40-
auto compile_settings = torch_tensorrt::CompileSpec({input});
39+
auto input = torch_tensorrt::Input(dims, torch::kHalf)
40+
auto compile_settings = torch_tensorrt::ts::CompileSpec({input});
4141
// FP16 execution
4242
compile_settings.enabled_precisions = {torch::kHalf};
4343
// Compile module
44-
auto trt_mod = torch_tensorrt::CompileGraph(ts_mod, compile_settings);
44+
auto trt_mod = torch_tensorrt::ts::CompileModule(ts_mod, compile_settings);
4545
// Run like normal
4646
auto results = trt_mod.forward({in_tensor});
4747
// Save module for later

0 commit comments

Comments
 (0)