-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Unable to run autoscheduler program in Windows using Visual Studio #4893
Comments
I'm adding "Add CMake tutorial" to the TODOs in #4644 |
The tutorials intentionally do not use a build system. The intent is to minimize the number of layers of abstraction to begin with and force people to understand the raw compiler invocations. This is especially important for the generator tutorial because it uses staged compilation. Unfortunately this is all at odds with how people build things on Windows. So I guess we need a later tutorial that's a Hello World for Halide in Visual Studio. Or maybe it could be an explanatory comment in a Halide CMake tutorial? I'm not sure what else you need to do in visual studio once you have a minimal cmake project. |
This is the plan. VS2017+ has native support for CMake projects, so a tutorial that introduces how to build Halide with CMake suffices for all platforms. |
Can I use Cmake with the Halide binaries for Windows? |
You can and should use CMake, but note that the support will not be as robust as in #4644 See README_cmake.md for details on how to use it. |
|
It should generate a .lib regardless. I'm guessing it says ".a" simply because that's the convention on Linux. |
Inside the root directory of halide binaries for windows, I created a folder called autoschedule.
set(HALIDE_DISTRIB_DIR "${CMAKE_CURRENT_LIST_DIR}/../../distrib") include("${HALIDE_DISTRIB_DIR}/halide.cmake") add_executable(autoschedule "${CMAKE_CURRENT_SOURCE_DIR}/lesson_21_auto_scheduler_run.cpp") file(GLOB GENS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/*_generator.cpp")
CMake Error at CMakeLists.txt:13 (halide_use_image_io): -- Configuring incomplete, errors occurred! |
The following program
https://halide-lang.org/tutorials/tutorial_lesson_21_auto_scheduler_generate.html
is compiled on Linux with the following command:
g++ lesson_21_auto_scheduler_generate.cpp ../tools/GenGen.cpp -g -std=c++11 -fno-rtti -I ../include -L ../bin -lHalide -lpthread -ldl -o lesson_21_generate
No instructions are given to compile it in Windows.
The text was updated successfully, but these errors were encountered: