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

[Windows] Enable instrumentation tests #3298

Merged
merged 4 commits into from
Jan 30, 2025
Merged

[Windows] Enable instrumentation tests #3298

merged 4 commits into from
Jan 30, 2025

Conversation

anmyachev
Copy link
Contributor

@anmyachev anmyachev commented Jan 28, 2025

Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
@@ -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*)
Copy link
Contributor Author

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"]
Copy link
Contributor Author

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"]
Copy link
Contributor Author

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")
Copy link
Contributor Author

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

@anmyachev anmyachev marked this pull request as ready for review January 30, 2025 19:44
@anmyachev anmyachev linked an issue Jan 30, 2025 that may be closed by this pull request
@anmyachev anmyachev merged commit 4e1dd25 into main Jan 30, 2025
6 checks passed
@anmyachev anmyachev deleted the amyachev/issue3275 branch January 30, 2025 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable instrumentation tests
2 participants