-
Notifications
You must be signed in to change notification settings - Fork 104
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 Migration #219
base: main
Are you sure you want to change the base?
Windows Migration #219
Conversation
envpool/core/async_envpool.h
Outdated
|
||
// The following does not work under Windows. Need to find alternatives. | ||
// for (std::size_t tid = 0; tid < num_threads_; ++tid) { | ||
// cpu_set_t cpuset; | ||
// CPU_ZERO(&cpuset); | ||
// std::size_t cid = (thread_affinity_offset + tid) % processor_count; | ||
// CPU_SET(cid, &cpuset); | ||
// pthread_setaffinity_np(workers_[tid].native_handle(), sizeof(cpu_set_t), | ||
// &cpuset); | ||
// } |
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.
use #ifdef
envpool/workspace0.bzl
Outdated
|
||
maybe( | ||
http_archive, | ||
name = "mujoco", |
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.
name = "mujoco", | |
name = "mujoco_windows", |
third_party/cuda/cuda.bzl
Outdated
cuda_dir = rctx.os.environ.get(_CUDA_DIR, default = "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.7") | ||
""" rctx.symlink("{}/include".format(cuda_dir), "include") | ||
rctx.symlink("{}/lib64".format(cuda_dir), "lib64") """ |
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.
use sth like if windows: xxx; elif linux: xxx
.bazelrc
Outdated
build --action_env=BAZEL_LINKLIBS=-l%:libstdc++.a:-lm | ||
build --action_env=BAZEL_LINKOPTS=-static-libgcc | ||
build --action_env=CUDA_DIR=/usr/local/cuda | ||
build --incompatible_strict_action_env --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --client_env=BAZEL_CXXOPTS=-std=c++17 | ||
build --incompatible_strict_action_env --cxxopt=/std:c++17 --host_cxxopt=/std:c++17 --client_env=BAZEL_CXXOPTS=/std:c++17 |
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.
not sure the best practice here, @mavenlin can you take a look?
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 remember tensorflow use the same mechanism, but they have some fancy config script to detect cuda and generate the bazelrc.
This StackOverflow thread has good examples and links on how to conditionally config bazel for windows. https://stackoverflow.com/questions/48860910/how-to-use-select-to-properly-detect-whether-i-am-building-c-code-in-windows-o |
Description
I attempt to migrate envpool to the Windows environment.
Motivation and Context
Why is this change required? What problem does it solve?
See details of my progress and Windows Environment setup in WINDOWS.md
If it fixes an open issue, please link to the issue here. close #168
You can use the syntax
close #233
if this solves the issue #233Types of changes
What types of changes does your code introduce? Put an
x
in all the boxes that apply:Implemented Tasks
Details in WINDOWS.md
Checklist
Go over all the following points, and put an
x
in all the boxes that apply.If you are unsure about any of these, don't hesitate to ask. We are here to help!
make format
(required)make lint
(required)make bazel-test
pass. (required)