-
Notifications
You must be signed in to change notification settings - Fork 49
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] Enable instrumentation tests #3298
Conversation
anmyachev
commented
Jan 28, 2025
•
edited
Loading
edited
- https://github.com/intel/intel-xpu-backend-for-triton/actions/runs/13056599095 (passed)
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
scripts/test-triton.sh
Outdated
@@ -330,11 +330,12 @@ run_instrumentation_tests() { | |||
fi | |||
|
|||
INSTRUMENTATION_LIB_DIR=$(ls -1d $TRITON_PROJ/python/build/*lib*/triton/instrumentation) || err "Could not find $TRITON_PROJ/python/build/*lib*/triton/instrumentation, build Triton first" | |||
INSTRUMENTATION_LIB_NAME=$(ls $INSTRUMENTATION_LIB_DIR/*GPUInstrumentationTestLib*) |
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.
For windows: GPUInstrumentationTestLib.dll
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
@@ -11,7 +11,7 @@ def is_xpu(): | |||
|
|||
def _cc_cmd(cc, src, out, include_dirs, library_dirs, libraries): | |||
if "cl.EXE" in cc or "clang-cl" in cc: | |||
cc_cmd = [cc, "/Zc:__cplusplus", "/std:c++17", src, "/nologo", "/O2", "/LD"] | |||
cc_cmd = [cc, "/Zc:__cplusplus", "/std:c++17", src, "/nologo", "/O2", "/LD", "/wd4996"] |
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.
To avoid receiving the following warnings in stderr (otherwise instrumentation\test_gpuhello.py::test_op
doesn't work): sycl_functions.h:57:27: warning: \'getenv\' is deprecated: This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
@@ -24,6 +24,8 @@ def _cc_cmd(cc, src, out, include_dirs, library_dirs, libraries): | |||
cc_cmd = [cc, src, "-O3", "-shared", "-Wno-psabi"] | |||
if os.name != "nt": | |||
cc_cmd += ["-fPIC"] | |||
else: | |||
cc_cmd += ["-Wno-deprecated-declarations"] |
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 same, but for icpx
.
@@ -99,3 +99,7 @@ PassPluginLibraryInfo getPassPluginInfo() { | |||
extern "C" LLVM_ATTRIBUTE_WEAK PassPluginLibraryInfo llvmGetPassPluginInfo() { | |||
return getPassPluginInfo(); | |||
} | |||
|
|||
#ifdef WIN32 | |||
#pragma comment(linker, "/export:llvmGetPassPluginInfo") |
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 workaround since llvmGetPassPluginInfo
doesn't have __declspec(dllexport)
in its declaration .
__declspec(dllexport)
was removed in llvm/llvm-project@5533357