-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ci] Use clang+Ninja to build Taichi on windows #3735
Conversation
✔️ Deploy Preview for jovial-fermat-aa59dc ready! 🔨 Explore the source changes: 525186b 🔍 Inspect the deploy log: https://app.netlify.com/sites/jovial-fermat-aa59dc/deploys/61bc00aae9cfd70007f0cb8e 😎 Browse the preview: https://deploy-preview-3735--jovial-fermat-aa59dc.netlify.app |
/format |
579728b
to
e474e20
Compare
Cache is all miss, not sure why. The build works |
Maybe need to add |
No need. ccache is called, it's just that ccache thinks it's all miss. (in the cmakelist it detects the ccache program and automatically set the launchers) |
setup.py
Outdated
@@ -187,7 +187,7 @@ def prepare_package(self): | |||
shutil.copy(moltenvk_path, | |||
os.path.join(target, 'libMoltenVK.dylib')) | |||
else: | |||
shutil.copy('runtimes/Release/taichi_core.dll', | |||
shutil.copy('runtimes/taichi_core.dll', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OOC do we need Release
here (seems like we explicitly opened a Release folder above for ninja as well) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The release folder is generated by msbuild. I can't think of a good way to detect whether msbuild or ninja is used. Maybe just enforce ninja?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIUC this line already implicitly enforced ninja? ;) If so we'll need to be extra careful and make sure the dev install is updated correctly. ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes... kind of sad, but I can't think of a way to cleanly deal with this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bobcao3 I don't mind switching to ninja for now ;) but this PR better stays consistent ;) . For example, if (CMAKE_GENERATOR EQUAL "Ninja")
above kinda hints that we still support msbuild :D
If we are sure ninja is easy to install on windows and we know how to update dev install doc, we could just error out on msbuild in cmake?
Do all the compilations happen in |
Yes, because it is built by |
Update win_build.ps1
b368f5a
to
20dceb7
Compare
Is it better to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, thanks!!
if ($install) { | ||
if ($develop) { | ||
python -m pip install -v -e . | ||
python setup.py develop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These commands are kinda equivalent (and IIUC pip install version is preferred :P so let's keep this unchanged?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the pip version caching won't work because it uses a different path every time and the generators use absolute path everywhere
setup.py
Outdated
@@ -187,7 +187,7 @@ def prepare_package(self): | |||
shutil.copy(moltenvk_path, | |||
os.path.join(target, 'libMoltenVK.dylib')) | |||
else: | |||
shutil.copy('runtimes/Release/taichi_core.dll', | |||
shutil.copy('runtimes/taichi_core.dll', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bobcao3 I don't mind switching to ninja for now ;) but this PR better stays consistent ;) . For example, if (CMAKE_GENERATOR EQUAL "Ninja")
above kinda hints that we still support msbuild :D
If we are sure ninja is easy to install on windows and we know how to update dev install doc, we could just error out on msbuild in cmake?
I tried CMAKE_GENERATOR but it doesn't really work, it did not detect Ninja at all so... not sure |
The changes made here LGTM and I hope this will be landed in the master soon as it dramatically accelerates the windows build 💯 We can figure out how to use the preferred build approach |
@bobcao3 Would you mind resolving the merge conflict so that we can get it in? Thanks a lot! |
…into bobcao3-patch-2
```shell | ||
.\build_taichi.ps1 | ||
``` | ||
```shell |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a three-space indentation to this code block
|
||
4. Build taichi by using `python setup.py develop` | ||
|
||
:::note |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we just add this part (or move from other places)? I somehow couldn't find where it was moved from hmmm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously we asked the user to run build_taichi.ps1
. Now we are asking them to build it through command line, the build script is for CI, not really for end user
/format |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Related issue = #