diff --git a/core/partitioning/shape_analysis.cpp b/core/partitioning/shape_analysis.cpp index 7a36529949..f940c87751 100644 --- a/core/partitioning/shape_analysis.cpp +++ b/core/partitioning/shape_analysis.cpp @@ -167,7 +167,7 @@ void getSegmentsOutputByRunning( } if (cur_ivalue.toTensor().sizes().size() == 0) { // handle Scalar types, which has sizes of [] - input_shapes.push_back(util::toVec(util::toDims(c10::List({1})))); + input_shapes.push_back(util::toVec(util::toDims(c10::List({1})))); } else { input_shapes.push_back(util::toVec(util::toDims(cur_ivalue.toTensor().sizes()))); } diff --git a/cpp/bin/torchtrtc/main.cpp b/cpp/bin/torchtrtc/main.cpp index f98ed848de..bc3d5d4af0 100644 --- a/cpp/bin/torchtrtc/main.cpp +++ b/cpp/bin/torchtrtc/main.cpp @@ -35,7 +35,7 @@ bool unload_library(void* custom_lib) { bool success = false; #if defined(_WIN32) // Returns status non-zero for success - success = FreeLibrary(custom_lib) ? true : false; + success = FreeLibrary((HMODULE)custom_lib) ? true : false; #else success = dlclose(custom_lib) ? false : true; #endif diff --git a/cpp/include/torch_tensorrt/torch_tensorrt.h b/cpp/include/torch_tensorrt/torch_tensorrt.h index 45497a13a3..80db25e8f9 100644 --- a/cpp/include/torch_tensorrt/torch_tensorrt.h +++ b/cpp/include/torch_tensorrt/torch_tensorrt.h @@ -365,7 +365,7 @@ class TensorFormat { * signifying a static input shape or a set of three input shapes representing * the min, optiminal and max input shapes allowed for the engine. */ -struct TORCHTRT_API Input : torch::CustomClassHolder { +struct Input : torch::CustomClassHolder { /// Minimum acceptable input size into the engine std::vector min_shape; /// Optimal input size into the engine (size optimized for given kernels accept any size in min max range) @@ -520,7 +520,7 @@ struct TORCHTRT_API Input : torch::CustomClassHolder { * * This struct can either hold a complex inputs of shape or a flattened one, */ -struct TORCHTRT_API GraphInputs { +struct GraphInputs { torch::jit::IValue input_signature; // nested Input, full input spec std::vector inputs; // flatten input spec }; @@ -592,14 +592,14 @@ struct CompileSpec { * * @param inputs */ - CompileSpec(std::vector inputs); + TORCHTRT_API CompileSpec(std::vector inputs); /** * @brief Construct a new Compile Spec object from IValue which represents the nesting of input tensors for a module. * * @param input_signature */ - CompileSpec(torch::jit::IValue input_signature); + TORCHTRT_API CompileSpec(torch::jit::IValue input_signature); // Defaults should reflect TensorRT defaults for BuilderConfig /**