Skip to content
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

Add vcpkg installation instructions #4539

Closed
wants to merge 2 commits into from

Conversation

LilyWangL
Copy link

Halide is available as a port in vcpkg, a C++ library manager that simplifies installation for Halide and other project dependencies. Documenting the install process here will help users get started by providing a single set of commands to build Halide, ready to be included in their projects.

We also test whether our library ports build in various configurations (dynamic, static) on various platforms (OSX, Linux, Windows: x86, x64, UWP, ARM) to keep a wide coverage for users.

I'm a maintainer for vcpkg, and here is what the port script looks like. We try to keep the library maintained as close as possible to the original library.

README.md Outdated Show resolved Hide resolved
@abadams
Copy link
Member

abadams commented Jan 23, 2020

Thanks for doing this! I followed the instructions in powershell and after a few failed starts got it working. The snags I hit were:

  • My visual studio install (2015) didn't work, as I didn't have the ATL/MFC component. The existing error message was fine - I just got a newer visual studio and made sure to include that component. Is it the case that using vcpkg on windows will require a newer visual studio than 2015 in general? Our readme states that 2015 is sufficient, so if you need a newer one we should state that in the vcpkg section.

  • vcpkg seems to default to x86-windows, which is not ideal for Halide. It would be good to add text to tell people how to list available versions and select the one they want. For me it was x64-windows

  • A clean vcpgk setup with Halide installed uses 90 gigabytes! I ran out of disk space a few times before I realized what was going wrong. We should warn people to expect this, and maybe provide a way to avoid it if it's not necessary. The main culprit seems to be the llvm buildtree in debug mode. Should we tell people to clean the build tree afterwards? I'm not sure of the correct way to do that with vcpkg.

  • There's a dependency on openblas, but Halide doesn't actually depend on openblas. One of the example apps uses it for some benchmarking comparisons, so I think it can be a dependency of the app target instead. The "app" feature is really example applications that use Halide, not "app support" as it is described in the port file.

  • The configuration seems to default all targets to off except for the host target (x86 or arm). Most serious use of Halide is as a cross-compiler. x86,arm,aarch64,ptx,opencl,opengl,metal should all default to on. nativeclient doesn't exist as a target anymore, and can be deleted. Also, I don't think there should be any dependency on an opencl or opengl package to use the opencl or opengl targets. We don't depend on any opencl/gl headers or libraries - we talk to the driver directly. Some of the tests do though, so a dependency on opencl might be necessary for building the tests.

@steven-johnson
Copy link
Contributor

No rush, but what's the status of this PR? Looks like there are a number of minor changes requested.

@LilyWangL
Copy link
Author

Sorry for my late reply. I will confirm these problems and fix soon.

@alexreinking alexreinking added the build Issues related to building Halide and with CI label May 4, 2020
@alexreinking
Copy link
Member

In reference to #4890 maybe we should bump the min build in these vcpkg instructions to 2017.

@alexreinking alexreinking self-assigned this May 4, 2020
@alexreinking
Copy link
Member

  • A clean vcpgk setup with Halide installed uses 90 gigabytes! I ran out of disk space a few times before I realized what was going wrong. We should warn people to expect this, and maybe provide a way to avoid it if it's not necessary. The main culprit seems to be the llvm buildtree in debug mode. Should we tell people to clean the build tree afterwards? I'm not sure of the correct way to do that with vcpkg.

  • There's a dependency on openblas, but Halide doesn't actually depend on openblas. One of the example apps uses it for some benchmarking comparisons, so I think it can be a dependency of the app target instead. The "app" feature is really example applications that use Halide, not "app support" as it is described in the port file.

  • The configuration seems to default all targets to off except for the host target (x86 or arm). Most serious use of Halide is as a cross-compiler. x86,arm,aarch64,ptx,opencl,opengl,metal should all default to on. nativeclient doesn't exist as a target anymore, and can be deleted. Also, I don't think there should be any dependency on an opencl or opengl package to use the opencl or opengl targets. We don't depend on any opencl/gl headers or libraries - we talk to the driver directly. Some of the tests do though, so a dependency on opencl might be necessary for building the tests.

@abadams -- all of these would be good issues to raise with the vcpkg maintainers

@abadams
Copy link
Member

abadams commented May 4, 2020

I am under the impression the PR author is the vcpkg maintainer for Halide.

@alexreinking
Copy link
Member

Hi again @LilyWangL -- I just opened microsoft/vcpkg#13580. We would love to add vcpkg instructions to the README once the newest release is available on your platform. Thanks!

@alexreinking
Copy link
Member

@LilyWangL -- are you still involved with vcpkg / the Halide port? We are very interested in getting our new release published on vcpkg.

@LilyWangL
Copy link
Author

@LilyWangL -- are you still involved with vcpkg / the Halide port? We are very interested in getting our new release published on vcpkg.

Yes, I just came back from vacation, I will check PR microsoft/vcpkg#13580 soon.

@alexreinking
Copy link
Member

alexreinking commented Oct 9, 2020

Thanks, @LilyWangL! I hope you enjoyed your vacation 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues related to building Halide and with CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants