Skip to content

Commit

Permalink
Merge pull request #1330 from pytorch/anuragd/fix_windows_compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
narendasan authored Sep 1, 2022
2 parents 2c55974 + 7245727 commit a1a4786
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion core/partitioning/shape_analysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<long int>({1}))));
input_shapes.push_back(util::toVec(util::toDims(c10::List<int64_t>({1}))));
} else {
input_shapes.push_back(util::toVec(util::toDims(cur_ivalue.toTensor().sizes())));
}
Expand Down
2 changes: 1 addition & 1 deletion cpp/bin/torchtrtc/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions cpp/include/torch_tensorrt/torch_tensorrt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<int64_t> min_shape;
/// Optimal input size into the engine (size optimized for given kernels accept any size in min max range)
Expand Down Expand Up @@ -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<Input> inputs; // flatten input spec
};
Expand Down Expand Up @@ -592,14 +592,14 @@ struct CompileSpec {
*
* @param inputs
*/
CompileSpec(std::vector<Input> inputs);
TORCHTRT_API CompileSpec(std::vector<Input> 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

/**
Expand Down

0 comments on commit a1a4786

Please sign in to comment.