Add Windows Build Support & Improve Build System#79
Open
MetinovAdik wants to merge 3 commits intoTencent-Hunyuan:mainfrom
Open
Add Windows Build Support & Improve Build System#79MetinovAdik wants to merge 3 commits intoTencent-Hunyuan:mainfrom
MetinovAdik wants to merge 3 commits intoTencent-Hunyuan:mainfrom
Conversation
right placing for new comments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several crucial fixes to enable a successful build and a smooth user experience on a standard Windows environment with the MSVC compiler and NVIDIA CUDA toolkit. The project currently fails to build on Windows out-of-the-box, and these changes address the root causes.
Summary of Changes
Streamlined Dependencies for Inference:
The
deepspeedpackage, while potentially useful for training, causes significant installation failures on Windows and is not required for running inference. This PR removesdeepspeedfrom the primaryrequirements.txtto ensure a smooth default installation for the majority of users. A new section has been added to theREADME.mdwith clear, optional instructions for advanced users who wish to install it for training purposes.MSVC Compatibility for
custom_rasterizer:Patched the C++ source files (
grid_neighbor.cppandrasterizer.cpp) to resolve two common Windows-specific compilation and linking issues:error C2398: narrowing conversion: Explicitly cast vector sizes toint64_twithintorch::zerosinitializers, as required by the stricter MSVC compiler.error LNK2001: unresolved external symbolfordata_ptr<long>(): Changed all instances oflong*anddata_ptr<long>()to the platform-agnosticint64_t*anddata_ptr<int64_t>(). This resolves a type size mismatch, aslongis 32-bit on Windows but 64-bit on Linux.Modernized Build for
DifferentiableRenderer:Replaced the Linux-specific
compile_mesh_painter.shshell script with a new, cross-platformsetup.pyfile. This leveragestorch.utils.cpp_extensionto automate the build process, making the installation of this module robust and seamless on all operating systems without manual intervention.These changes collectively allow the project to be cloned and run successfully on Windows. The C++ modifications are platform-agnostic and improve code correctness, while the dependency and build system changes vastly improve the user experience for a wider audience.