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
[XLA:CPU] Enable XLA on Windows #11299
Conversation
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.
Thank you for the PR!
@@ -58,8 +58,13 @@ TEST(InteractiveGraphviz, CPU) { | |||
|
|||
int status = proc.Communicate(&in, &out, &err); | |||
EXPECT_TRUE(WIFEXITED(status)); |
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.
Since WIFEXITED
doesn't exist on Windows, please move it inside #else
as well. Same for other places.
EXPECT_TRUE(status==0); | ||
EXPECT_EQ(0, status); |
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.
Both of these are equivalent. Maybe remove EXPECT_TRUE
?
.bazelrc
Outdated
build:win_clang --extra_execution_platforms=//tools/toolchains/win:x64_windows-clang-cl | ||
build:win_clang --host_platform=//tools/toolchains/win:x64_windows-clang-cl |
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.
@ddunl Could you please help take a look if these .bazelrc changes are okay?
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.
LGTM!
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.
Thank you! :)
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.
On second thought I realized that because we still use TF's bazelrc, we may need to have these under a new config like win_clang_xla
. Does that sound ok?
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.
Hi @ddunl, got your point. I will create a pull request to TF and update TF's .bazelrc with win_clang_xla config and revert the changes (back to build:win_clang --extra_execution_platforms=//tensorflow/tools/toolchains/win:x64_windows-clang-cl
) in XLA bazelrc. How often TF bazelrc is merged to XLA bazelrc? Do you have any documentation for XLA where we can update the steps to run XLA on Windows?
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.
I can merge the TF change with this change on our end, I just wanted to make sure that we can use a different config for XLA. I think right now we unfortunately just have to have an extra copy like win_clang_xla
that has all the same options but just the correct toolchain paths for this repo. If that sounds reasonable then I can do that change with this PR internally.
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.
Yeah, that sounds good. Please go ahead and create win_clang_xla with this PR internally
Co-authored-by: Penporn Koanantakool <38085909+penpornk@users.noreply.github.com>
Co-authored-by: Penporn Koanantakool <38085909+penpornk@users.noreply.github.com>
Hi @penpornk please review the PR, I have made the changes |
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.
Thank you for the changes!
Imported from GitHub PR openxla/xla#11299 This PR aims to enable the XLA test cases on the Windows Platform. The changes made: 1. Changed the .bazelrc file to use the correct toolchain and platform This change will allow the user to successfully run XLA tests on the Windows platform using the Clang compiler using '--config=win_clang' in the bazel command 2. Added conditions to a few test cases to successfully run on the Windows platform These test cases check the exit/termination status of a process WIFEXITED is typically supported in POSIX-compliant operating systems like Unix and Linux to check if a process has terminated normally. WEXITSTATUS allows examining the termination status of child processes. However, these macros are not Windows compliant, hence the additional condition block was added to check the exit/termination status of process or child process for the Windows platform Copybara import of the project: -- ece9eefa224a6d051bcac089fe2a9a393af16a2b by Raunak <mayank.kumar.raunak@intel.com>: Enable XLA Windows -- 347c0326af8f608047f06345cad4dfbb53a52150 by mraunak <83710963+mraunak@users.noreply.github.com>: Update interactive_graphviz_bin_test.cc -- 2d4a3c2bb2ea23f12029583c53087d8739da0319 by mraunak <83710963+mraunak@users.noreply.github.com>: Update xla/tools/interactive_graphviz_bin_test.cc Co-authored-by: Penporn Koanantakool <38085909+penpornk@users.noreply.github.com> -- 90ad8b2730900d7f82b0fb1a83a73ffa2e452e0e by mraunak <83710963+mraunak@users.noreply.github.com>: Update run_hlo_module_bin_test.cc -- 7f31412f6b57e53bd56ba92149b015fcba92b07c by mraunak <83710963+mraunak@users.noreply.github.com>: Update xla/tools/run_hlo_module_bin_test.cc Co-authored-by: Penporn Koanantakool <38085909+penpornk@users.noreply.github.com> -- 4d39e35461f6977f36404a435c68b4809fb51a44 by mraunak <83710963+mraunak@users.noreply.github.com>: Update hlo_expand_test.cc -- 816b9ae0498831b55139c72d627d07f05e51213b by mraunak <83710963+mraunak@users.noreply.github.com>: Update hlo_expand_test.cc -- a728fff1aca4258602c3d7c78afcc7d38b545b7a by mraunak <83710963+mraunak@users.noreply.github.com>: Update hlo_expand_test.cc -- ffcb6861becf8de7a5c4e64ef0f19d977475d281 by mraunak <83710963+mraunak@users.noreply.github.com>: Update interactive_graphviz_bin_test.cc -- f181497793c2c48079d72b545e6efb837f490504 by mraunak <83710963+mraunak@users.noreply.github.com>: Update interactive_graphviz_bin_test.cc -- f9af75677e4663b3348e9e89376262eaff389ea9 by mraunak <83710963+mraunak@users.noreply.github.com>: Update run_hlo_module_bin_test.cc Merging this change closes #11299 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#11299 from Intel-tensorflow:mraunak/xla_windows f9af75677e4663b3348e9e89376262eaff389ea9 PiperOrigin-RevId: 624293815
Imported from GitHub PR openxla/xla#11299 This PR aims to enable the XLA test cases on the Windows Platform. The changes made: 1. Changed the .bazelrc file to use the correct toolchain and platform This change will allow the user to successfully run XLA tests on the Windows platform using the Clang compiler using '--config=win_clang' in the bazel command 2. Added conditions to a few test cases to successfully run on the Windows platform These test cases check the exit/termination status of a process WIFEXITED is typically supported in POSIX-compliant operating systems like Unix and Linux to check if a process has terminated normally. WEXITSTATUS allows examining the termination status of child processes. However, these macros are not Windows compliant, hence the additional condition block was added to check the exit/termination status of process or child process for the Windows platform Copybara import of the project: -- ece9eefa224a6d051bcac089fe2a9a393af16a2b by Raunak <mayank.kumar.raunak@intel.com>: Enable XLA Windows -- 347c0326af8f608047f06345cad4dfbb53a52150 by mraunak <83710963+mraunak@users.noreply.github.com>: Update interactive_graphviz_bin_test.cc -- 2d4a3c2bb2ea23f12029583c53087d8739da0319 by mraunak <83710963+mraunak@users.noreply.github.com>: Update xla/tools/interactive_graphviz_bin_test.cc Co-authored-by: Penporn Koanantakool <38085909+penpornk@users.noreply.github.com> -- 90ad8b2730900d7f82b0fb1a83a73ffa2e452e0e by mraunak <83710963+mraunak@users.noreply.github.com>: Update run_hlo_module_bin_test.cc -- 7f31412f6b57e53bd56ba92149b015fcba92b07c by mraunak <83710963+mraunak@users.noreply.github.com>: Update xla/tools/run_hlo_module_bin_test.cc Co-authored-by: Penporn Koanantakool <38085909+penpornk@users.noreply.github.com> -- 4d39e35461f6977f36404a435c68b4809fb51a44 by mraunak <83710963+mraunak@users.noreply.github.com>: Update hlo_expand_test.cc -- 816b9ae0498831b55139c72d627d07f05e51213b by mraunak <83710963+mraunak@users.noreply.github.com>: Update hlo_expand_test.cc -- a728fff1aca4258602c3d7c78afcc7d38b545b7a by mraunak <83710963+mraunak@users.noreply.github.com>: Update hlo_expand_test.cc -- ffcb6861becf8de7a5c4e64ef0f19d977475d281 by mraunak <83710963+mraunak@users.noreply.github.com>: Update interactive_graphviz_bin_test.cc -- f181497793c2c48079d72b545e6efb837f490504 by mraunak <83710963+mraunak@users.noreply.github.com>: Update interactive_graphviz_bin_test.cc -- f9af75677e4663b3348e9e89376262eaff389ea9 by mraunak <83710963+mraunak@users.noreply.github.com>: Update run_hlo_module_bin_test.cc Merging this change closes #11299 Reverts 94350b8 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#11299 from Intel-tensorflow:mraunak/xla_windows f9af75677e4663b3348e9e89376262eaff389ea9 PiperOrigin-RevId: 624293815
Imported from GitHub PR openxla/xla#11299 This PR aims to enable the XLA test cases on the Windows Platform. The changes made: 1. Changed the .bazelrc file to use the correct toolchain and platform This change will allow the user to successfully run XLA tests on the Windows platform using the Clang compiler using '--config=win_clang' in the bazel command 2. Added conditions to a few test cases to successfully run on the Windows platform These test cases check the exit/termination status of a process WIFEXITED is typically supported in POSIX-compliant operating systems like Unix and Linux to check if a process has terminated normally. WEXITSTATUS allows examining the termination status of child processes. However, these macros are not Windows compliant, hence the additional condition block was added to check the exit/termination status of process or child process for the Windows platform Copybara import of the project: -- ece9eefa224a6d051bcac089fe2a9a393af16a2b by Raunak <mayank.kumar.raunak@intel.com>: Enable XLA Windows -- 347c0326af8f608047f06345cad4dfbb53a52150 by mraunak <83710963+mraunak@users.noreply.github.com>: Update interactive_graphviz_bin_test.cc -- 2d4a3c2bb2ea23f12029583c53087d8739da0319 by mraunak <83710963+mraunak@users.noreply.github.com>: Update xla/tools/interactive_graphviz_bin_test.cc Co-authored-by: Penporn Koanantakool <38085909+penpornk@users.noreply.github.com> -- 90ad8b2730900d7f82b0fb1a83a73ffa2e452e0e by mraunak <83710963+mraunak@users.noreply.github.com>: Update run_hlo_module_bin_test.cc -- 7f31412f6b57e53bd56ba92149b015fcba92b07c by mraunak <83710963+mraunak@users.noreply.github.com>: Update xla/tools/run_hlo_module_bin_test.cc Co-authored-by: Penporn Koanantakool <38085909+penpornk@users.noreply.github.com> -- 4d39e35461f6977f36404a435c68b4809fb51a44 by mraunak <83710963+mraunak@users.noreply.github.com>: Update hlo_expand_test.cc -- 816b9ae0498831b55139c72d627d07f05e51213b by mraunak <83710963+mraunak@users.noreply.github.com>: Update hlo_expand_test.cc -- a728fff1aca4258602c3d7c78afcc7d38b545b7a by mraunak <83710963+mraunak@users.noreply.github.com>: Update hlo_expand_test.cc -- ffcb6861becf8de7a5c4e64ef0f19d977475d281 by mraunak <83710963+mraunak@users.noreply.github.com>: Update interactive_graphviz_bin_test.cc -- f181497793c2c48079d72b545e6efb837f490504 by mraunak <83710963+mraunak@users.noreply.github.com>: Update interactive_graphviz_bin_test.cc -- f9af75677e4663b3348e9e89376262eaff389ea9 by mraunak <83710963+mraunak@users.noreply.github.com>: Update run_hlo_module_bin_test.cc Merging this change closes #11299 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#11299 from Intel-tensorflow:mraunak/xla_windows f9af75677e4663b3348e9e89376262eaff389ea9 PiperOrigin-RevId: 625468098
Imported from GitHub PR #11299 This PR aims to enable the XLA test cases on the Windows Platform. The changes made: 1. Changed the .bazelrc file to use the correct toolchain and platform This change will allow the user to successfully run XLA tests on the Windows platform using the Clang compiler using '--config=win_clang' in the bazel command 2. Added conditions to a few test cases to successfully run on the Windows platform These test cases check the exit/termination status of a process WIFEXITED is typically supported in POSIX-compliant operating systems like Unix and Linux to check if a process has terminated normally. WEXITSTATUS allows examining the termination status of child processes. However, these macros are not Windows compliant, hence the additional condition block was added to check the exit/termination status of process or child process for the Windows platform Copybara import of the project: -- ece9eef by Raunak <mayank.kumar.raunak@intel.com>: Enable XLA Windows -- 347c032 by mraunak <83710963+mraunak@users.noreply.github.com>: Update interactive_graphviz_bin_test.cc -- 2d4a3c2 by mraunak <83710963+mraunak@users.noreply.github.com>: Update xla/tools/interactive_graphviz_bin_test.cc Co-authored-by: Penporn Koanantakool <38085909+penpornk@users.noreply.github.com> -- 90ad8b2 by mraunak <83710963+mraunak@users.noreply.github.com>: Update run_hlo_module_bin_test.cc -- 7f31412 by mraunak <83710963+mraunak@users.noreply.github.com>: Update xla/tools/run_hlo_module_bin_test.cc Co-authored-by: Penporn Koanantakool <38085909+penpornk@users.noreply.github.com> -- 4d39e35 by mraunak <83710963+mraunak@users.noreply.github.com>: Update hlo_expand_test.cc -- 816b9ae by mraunak <83710963+mraunak@users.noreply.github.com>: Update hlo_expand_test.cc -- a728fff by mraunak <83710963+mraunak@users.noreply.github.com>: Update hlo_expand_test.cc -- ffcb686 by mraunak <83710963+mraunak@users.noreply.github.com>: Update interactive_graphviz_bin_test.cc -- f181497 by mraunak <83710963+mraunak@users.noreply.github.com>: Update interactive_graphviz_bin_test.cc -- f9af756 by mraunak <83710963+mraunak@users.noreply.github.com>: Update run_hlo_module_bin_test.cc Merging this change closes #11299 FUTURE_COPYBARA_INTEGRATE_REVIEW=#11299 from Intel-tensorflow:mraunak/xla_windows f9af756 PiperOrigin-RevId: 625468098
Imported from GitHub PR openxla/xla#11299 This PR aims to enable the XLA test cases on the Windows Platform. The changes made: 1. Changed the .bazelrc file to use the correct toolchain and platform This change will allow the user to successfully run XLA tests on the Windows platform using the Clang compiler using '--config=win_clang' in the bazel command 2. Added conditions to a few test cases to successfully run on the Windows platform These test cases check the exit/termination status of a process WIFEXITED is typically supported in POSIX-compliant operating systems like Unix and Linux to check if a process has terminated normally. WEXITSTATUS allows examining the termination status of child processes. However, these macros are not Windows compliant, hence the additional condition block was added to check the exit/termination status of process or child process for the Windows platform Copybara import of the project: -- ece9eefa224a6d051bcac089fe2a9a393af16a2b by Raunak <mayank.kumar.raunak@intel.com>: Enable XLA Windows -- 347c0326af8f608047f06345cad4dfbb53a52150 by mraunak <83710963+mraunak@users.noreply.github.com>: Update interactive_graphviz_bin_test.cc -- 2d4a3c2bb2ea23f12029583c53087d8739da0319 by mraunak <83710963+mraunak@users.noreply.github.com>: Update xla/tools/interactive_graphviz_bin_test.cc Co-authored-by: Penporn Koanantakool <38085909+penpornk@users.noreply.github.com> -- 90ad8b2730900d7f82b0fb1a83a73ffa2e452e0e by mraunak <83710963+mraunak@users.noreply.github.com>: Update run_hlo_module_bin_test.cc -- 7f31412f6b57e53bd56ba92149b015fcba92b07c by mraunak <83710963+mraunak@users.noreply.github.com>: Update xla/tools/run_hlo_module_bin_test.cc Co-authored-by: Penporn Koanantakool <38085909+penpornk@users.noreply.github.com> -- 4d39e35461f6977f36404a435c68b4809fb51a44 by mraunak <83710963+mraunak@users.noreply.github.com>: Update hlo_expand_test.cc -- 816b9ae0498831b55139c72d627d07f05e51213b by mraunak <83710963+mraunak@users.noreply.github.com>: Update hlo_expand_test.cc -- a728fff1aca4258602c3d7c78afcc7d38b545b7a by mraunak <83710963+mraunak@users.noreply.github.com>: Update hlo_expand_test.cc -- ffcb6861becf8de7a5c4e64ef0f19d977475d281 by mraunak <83710963+mraunak@users.noreply.github.com>: Update interactive_graphviz_bin_test.cc -- f181497793c2c48079d72b545e6efb837f490504 by mraunak <83710963+mraunak@users.noreply.github.com>: Update interactive_graphviz_bin_test.cc -- f9af75677e4663b3348e9e89376262eaff389ea9 by mraunak <83710963+mraunak@users.noreply.github.com>: Update run_hlo_module_bin_test.cc Merging this change closes #11299 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#11299 from Intel-tensorflow:mraunak/xla_windows f9af75677e4663b3348e9e89376262eaff389ea9 PiperOrigin-RevId: 625468098
Imported from GitHub PR openxla/xla#11299 This PR aims to enable the XLA test cases on the Windows Platform. The changes made: 1. Changed the .bazelrc file to use the correct toolchain and platform This change will allow the user to successfully run XLA tests on the Windows platform using the Clang compiler using '--config=win_clang' in the bazel command 2. Added conditions to a few test cases to successfully run on the Windows platform These test cases check the exit/termination status of a process WIFEXITED is typically supported in POSIX-compliant operating systems like Unix and Linux to check if a process has terminated normally. WEXITSTATUS allows examining the termination status of child processes. However, these macros are not Windows compliant, hence the additional condition block was added to check the exit/termination status of process or child process for the Windows platform Copybara import of the project: -- ece9eefa224a6d051bcac089fe2a9a393af16a2b by Raunak <mayank.kumar.raunak@intel.com>: Enable XLA Windows -- 347c0326af8f608047f06345cad4dfbb53a52150 by mraunak <83710963+mraunak@users.noreply.github.com>: Update interactive_graphviz_bin_test.cc -- 2d4a3c2bb2ea23f12029583c53087d8739da0319 by mraunak <83710963+mraunak@users.noreply.github.com>: Update xla/tools/interactive_graphviz_bin_test.cc Co-authored-by: Penporn Koanantakool <38085909+penpornk@users.noreply.github.com> -- 90ad8b2730900d7f82b0fb1a83a73ffa2e452e0e by mraunak <83710963+mraunak@users.noreply.github.com>: Update run_hlo_module_bin_test.cc -- 7f31412f6b57e53bd56ba92149b015fcba92b07c by mraunak <83710963+mraunak@users.noreply.github.com>: Update xla/tools/run_hlo_module_bin_test.cc Co-authored-by: Penporn Koanantakool <38085909+penpornk@users.noreply.github.com> -- 4d39e35461f6977f36404a435c68b4809fb51a44 by mraunak <83710963+mraunak@users.noreply.github.com>: Update hlo_expand_test.cc -- 816b9ae0498831b55139c72d627d07f05e51213b by mraunak <83710963+mraunak@users.noreply.github.com>: Update hlo_expand_test.cc -- a728fff1aca4258602c3d7c78afcc7d38b545b7a by mraunak <83710963+mraunak@users.noreply.github.com>: Update hlo_expand_test.cc -- ffcb6861becf8de7a5c4e64ef0f19d977475d281 by mraunak <83710963+mraunak@users.noreply.github.com>: Update interactive_graphviz_bin_test.cc -- f181497793c2c48079d72b545e6efb837f490504 by mraunak <83710963+mraunak@users.noreply.github.com>: Update interactive_graphviz_bin_test.cc -- f9af75677e4663b3348e9e89376262eaff389ea9 by mraunak <83710963+mraunak@users.noreply.github.com>: Update run_hlo_module_bin_test.cc Merging this change closes #11299 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#11299 from Intel-tensorflow:mraunak/xla_windows f9af75677e4663b3348e9e89376262eaff389ea9 PiperOrigin-RevId: 625468098
Imported from GitHub PR #11299 This PR aims to enable the XLA test cases on the Windows Platform. The changes made: 1. Changed the .bazelrc file to use the correct toolchain and platform This change will allow the user to successfully run XLA tests on the Windows platform using the Clang compiler using '--config=win_clang' in the bazel command 2. Added conditions to a few test cases to successfully run on the Windows platform These test cases check the exit/termination status of a process WIFEXITED is typically supported in POSIX-compliant operating systems like Unix and Linux to check if a process has terminated normally. WEXITSTATUS allows examining the termination status of child processes. However, these macros are not Windows compliant, hence the additional condition block was added to check the exit/termination status of process or child process for the Windows platform Copybara import of the project: -- ece9eef by Raunak <mayank.kumar.raunak@intel.com>: Enable XLA Windows -- 347c032 by mraunak <83710963+mraunak@users.noreply.github.com>: Update interactive_graphviz_bin_test.cc -- 2d4a3c2 by mraunak <83710963+mraunak@users.noreply.github.com>: Update xla/tools/interactive_graphviz_bin_test.cc Co-authored-by: Penporn Koanantakool <38085909+penpornk@users.noreply.github.com> -- 90ad8b2 by mraunak <83710963+mraunak@users.noreply.github.com>: Update run_hlo_module_bin_test.cc -- 7f31412 by mraunak <83710963+mraunak@users.noreply.github.com>: Update xla/tools/run_hlo_module_bin_test.cc Co-authored-by: Penporn Koanantakool <38085909+penpornk@users.noreply.github.com> -- 4d39e35 by mraunak <83710963+mraunak@users.noreply.github.com>: Update hlo_expand_test.cc -- 816b9ae by mraunak <83710963+mraunak@users.noreply.github.com>: Update hlo_expand_test.cc -- a728fff by mraunak <83710963+mraunak@users.noreply.github.com>: Update hlo_expand_test.cc -- ffcb686 by mraunak <83710963+mraunak@users.noreply.github.com>: Update interactive_graphviz_bin_test.cc -- f181497 by mraunak <83710963+mraunak@users.noreply.github.com>: Update interactive_graphviz_bin_test.cc -- f9af756 by mraunak <83710963+mraunak@users.noreply.github.com>: Update run_hlo_module_bin_test.cc Merging this change closes #11299 FUTURE_COPYBARA_INTEGRATE_REVIEW=#11299 from Intel-tensorflow:mraunak/xla_windows f9af756 PiperOrigin-RevId: 625468098
Imported from GitHub PR openxla/xla#11299 This PR aims to enable the XLA test cases on the Windows Platform. The changes made: 1. Changed the .bazelrc file to use the correct toolchain and platform This change will allow the user to successfully run XLA tests on the Windows platform using the Clang compiler using '--config=win_clang' in the bazel command 2. Added conditions to a few test cases to successfully run on the Windows platform These test cases check the exit/termination status of a process WIFEXITED is typically supported in POSIX-compliant operating systems like Unix and Linux to check if a process has terminated normally. WEXITSTATUS allows examining the termination status of child processes. However, these macros are not Windows compliant, hence the additional condition block was added to check the exit/termination status of process or child process for the Windows platform Copybara import of the project: -- ece9eefa224a6d051bcac089fe2a9a393af16a2b by Raunak <mayank.kumar.raunak@intel.com>: Enable XLA Windows -- 347c0326af8f608047f06345cad4dfbb53a52150 by mraunak <83710963+mraunak@users.noreply.github.com>: Update interactive_graphviz_bin_test.cc -- 2d4a3c2bb2ea23f12029583c53087d8739da0319 by mraunak <83710963+mraunak@users.noreply.github.com>: Update xla/tools/interactive_graphviz_bin_test.cc Co-authored-by: Penporn Koanantakool <38085909+penpornk@users.noreply.github.com> -- 90ad8b2730900d7f82b0fb1a83a73ffa2e452e0e by mraunak <83710963+mraunak@users.noreply.github.com>: Update run_hlo_module_bin_test.cc -- 7f31412f6b57e53bd56ba92149b015fcba92b07c by mraunak <83710963+mraunak@users.noreply.github.com>: Update xla/tools/run_hlo_module_bin_test.cc Co-authored-by: Penporn Koanantakool <38085909+penpornk@users.noreply.github.com> -- 4d39e35461f6977f36404a435c68b4809fb51a44 by mraunak <83710963+mraunak@users.noreply.github.com>: Update hlo_expand_test.cc -- 816b9ae0498831b55139c72d627d07f05e51213b by mraunak <83710963+mraunak@users.noreply.github.com>: Update hlo_expand_test.cc -- a728fff1aca4258602c3d7c78afcc7d38b545b7a by mraunak <83710963+mraunak@users.noreply.github.com>: Update hlo_expand_test.cc -- ffcb6861becf8de7a5c4e64ef0f19d977475d281 by mraunak <83710963+mraunak@users.noreply.github.com>: Update interactive_graphviz_bin_test.cc -- f181497793c2c48079d72b545e6efb837f490504 by mraunak <83710963+mraunak@users.noreply.github.com>: Update interactive_graphviz_bin_test.cc -- f9af75677e4663b3348e9e89376262eaff389ea9 by mraunak <83710963+mraunak@users.noreply.github.com>: Update run_hlo_module_bin_test.cc Merging this change closes #11299 PiperOrigin-RevId: 627216606
Imported from GitHub PR openxla/xla#11299 This PR aims to enable the XLA test cases on the Windows Platform. The changes made: 1. Changed the .bazelrc file to use the correct toolchain and platform This change will allow the user to successfully run XLA tests on the Windows platform using the Clang compiler using '--config=win_clang' in the bazel command 2. Added conditions to a few test cases to successfully run on the Windows platform These test cases check the exit/termination status of a process WIFEXITED is typically supported in POSIX-compliant operating systems like Unix and Linux to check if a process has terminated normally. WEXITSTATUS allows examining the termination status of child processes. However, these macros are not Windows compliant, hence the additional condition block was added to check the exit/termination status of process or child process for the Windows platform Copybara import of the project: -- ece9eefa224a6d051bcac089fe2a9a393af16a2b by Raunak <mayank.kumar.raunak@intel.com>: Enable XLA Windows -- 347c0326af8f608047f06345cad4dfbb53a52150 by mraunak <83710963+mraunak@users.noreply.github.com>: Update interactive_graphviz_bin_test.cc -- 2d4a3c2bb2ea23f12029583c53087d8739da0319 by mraunak <83710963+mraunak@users.noreply.github.com>: Update xla/tools/interactive_graphviz_bin_test.cc Co-authored-by: Penporn Koanantakool <38085909+penpornk@users.noreply.github.com> -- 90ad8b2730900d7f82b0fb1a83a73ffa2e452e0e by mraunak <83710963+mraunak@users.noreply.github.com>: Update run_hlo_module_bin_test.cc -- 7f31412f6b57e53bd56ba92149b015fcba92b07c by mraunak <83710963+mraunak@users.noreply.github.com>: Update xla/tools/run_hlo_module_bin_test.cc Co-authored-by: Penporn Koanantakool <38085909+penpornk@users.noreply.github.com> -- 4d39e35461f6977f36404a435c68b4809fb51a44 by mraunak <83710963+mraunak@users.noreply.github.com>: Update hlo_expand_test.cc -- 816b9ae0498831b55139c72d627d07f05e51213b by mraunak <83710963+mraunak@users.noreply.github.com>: Update hlo_expand_test.cc -- a728fff1aca4258602c3d7c78afcc7d38b545b7a by mraunak <83710963+mraunak@users.noreply.github.com>: Update hlo_expand_test.cc -- ffcb6861becf8de7a5c4e64ef0f19d977475d281 by mraunak <83710963+mraunak@users.noreply.github.com>: Update interactive_graphviz_bin_test.cc -- f181497793c2c48079d72b545e6efb837f490504 by mraunak <83710963+mraunak@users.noreply.github.com>: Update interactive_graphviz_bin_test.cc -- f9af75677e4663b3348e9e89376262eaff389ea9 by mraunak <83710963+mraunak@users.noreply.github.com>: Update run_hlo_module_bin_test.cc Merging this change closes #11299 PiperOrigin-RevId: 627216606
This PR aims to enable the XLA test cases on the Windows Platform. The changes made:
Changed the .bazelrc file to use the correct toolchain and platform
This change will allow the user to successfully run XLA tests on the Windows platform using the Clang compiler using '--config=win_clang' in the bazel command
Added conditions to a few test cases to successfully run on the Windows platform
These test cases check the exit/termination status of a process
WIFEXITED is typically supported in POSIX-compliant operating systems like Unix and Linux to check if a process has terminated normally. WEXITSTATUS allows examining the termination status of child processes. However, these macros are not Windows compliant, hence the additional condition block was added to check the exit/termination status of process or child process for the Windows platform