-
-
Notifications
You must be signed in to change notification settings - Fork 752
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
希望添加windows下Intel编译器支持(icx) #5126
Comments
Title: Hope to add Intel compiler support under windows (icx) |
例子 |
暂时没环境,可以参考下 ifort 的实现
改进下 icx 实现,提个 pr 过来 |
There is no environment for now, you can refer to the implementation of ifort
Improve the icx implementation and submit a PR. |
暂时没太多时间调这个,可以参考这个 patch 自己调下。#5132 |
先这样吧,凑活着能用了。。#5132 剩下的有啥改进,直接来 pr |
你在什么场景下需要该功能?
windows下使用oneapi icx
测试代码(抄的cppreference)
#include
#include
#include
#include
#include
#include
#ifdef PARALLEL
#include
namespace execution = std::execution;
#else
enum class execution { seq, unseq, par_unseq, par };
#endif
void measure([[maybe_unused]] auto policy, std::vectorstd::uint64_t v)
{
const auto start = std::chrono::steady_clock::now();
#ifdef PARALLEL
std::sort(policy, v.begin(), v.end());
#else
std::sort(v.begin(), v.end());
#endif
const auto finish = std::chrono::steady_clock::now();
std::cout << std::chrono::duration_caststd::chrono::milliseconds(finish - start)
<< '\n';
};
int main()
{
std::vectorstd::uint64_t v(1'000'000);
std::mt19937 gen {std::random_device{}()};
std::ranges::generate(v, gen);
}
描述可能的解决方案
toolchain("myicx")
set_homepage("https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compiler.html")
set_description("Intel LLVM C/C++ Compiler")
set_kind("standalone")
local icxvars = {"path",
"lib",
"libpath",
"include",
"DevEnvdir",
"VSInstallDir",
"VCInstallDir",
"WindowsSdkDir",
"WindowsLibPath",
"WindowsSDKVersion",
"WindowsSdkBinPath",
"UniversalCRTSdkDir",
"UCRTVersion"}
on_check(function (toolchain)
import("lib.detect.find_file")
import("lib.detect.find_tool")
描述你认为的候选方案
No response
其他信息
似乎必须要在环境变量里增加oneapi_root不然不知道怎么找setvars.bat
cc和cxx的driver似乎"icx-cl.exe"比较和现有的兼容,直接"icx.exe"会使得有的flag进不去,虽然Intel推荐使用icx.exe。
(报错例:
Copyright (C) 1985-2024 Intel Corporation. All rights reserved.
icx: warning: unknown argument ignored in clang-cl: '-fvisibility=hidden' [-Wunknown-argument]
icx: warning: unknown argument ignored in clang-cl: '-fvisibility-inlines-hidden' [-Wunknown-argument]
icx: warning: unknown argument ignored in clang-cl '-std=c++20'; did you mean '-Qstd=c++20'? [-Wunknown-argument]
icx: warning: unknown argument ignored in clang-cl: '-fexceptions' [-Wunknown-argument]
icx: warning: unknown argument ignored in clang-cl: '-fcxx-exceptions' [-Wunknown-argument]
icx: warning: unknown argument ignored in clang-cl '-MMD'; did you mean '-QMMD'? [-Wunknown-argument]
icx: warning: unknown argument ignored in clang-cl: '-MF' [-Wunknown-argument]
icx: warning: unknown argument ignored in clang-cl: '-fdiagnostics-color=always' [-Wunknown-argument]
)
The text was updated successfully, but these errors were encountered: