Open
Conversation
Trinkle23897
reviewed
Nov 3, 2022
envpool/core/async_envpool.h
Outdated
Comment on lines
+109
to
+118
|
|
||
| // 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); | ||
| // } |
Trinkle23897
reviewed
Nov 3, 2022
envpool/workspace0.bzl
Outdated
|
|
||
| maybe( | ||
| http_archive, | ||
| name = "mujoco", |
Collaborator
There was a problem hiding this comment.
Suggested change
| name = "mujoco", | |
| name = "mujoco_windows", |
Trinkle23897
reviewed
Nov 3, 2022
third_party/cuda/cuda.bzl
Outdated
Comment on lines
+20
to
+22
| 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") """ |
Collaborator
There was a problem hiding this comment.
use sth like if windows: xxx; elif linux: xxx
Trinkle23897
reviewed
Nov 3, 2022
.bazelrc
Outdated
| 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 |
Collaborator
There was a problem hiding this comment.
not sure the best practice here, @mavenlin can you take a look?
Member
There was a problem hiding this comment.
I remember tensorflow use the same mechanism, but they have some fancy config script to detect cuda and generate the bazelrc.
Member
|
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 #233if this solves the issue #233Types of changes
What types of changes does your code introduce? Put an
xin all the boxes that apply:Implemented Tasks
Details in WINDOWS.md
Checklist
Go over all the following points, and put an
xin 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-testpass. (required)