-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Add thrust and cub repos #38
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
load("@rules_cc//cc:defs.bzl", "cc_library") | ||
#load("@rules_license//rules:license.bzl", "license") | ||
|
||
#package(default_applicable_licenses = [":license"]) | ||
|
||
#license( | ||
# name = "license", | ||
# license_kinds = [ | ||
# "@rules_license//licenses/spdx:BSD-3-Clause", | ||
# ], | ||
# license_text = "LICENSE.TXT", | ||
#) | ||
|
||
filegroup( | ||
name = "include-src", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe call them |
||
srcs = glob([ | ||
"cub/*.h", | ||
]), | ||
) | ||
|
||
cc_library( | ||
name = "includes", | ||
hdrs = [":include-src"], | ||
includes = ["."], | ||
textual_hdrs = glob([ | ||
"cub/*.cuh", | ||
"cub/agent/*.cuh", | ||
"cub/block/*.cuh", | ||
"cub/block/specializations/*.cuh", | ||
"cub/device/*.cuh", | ||
"cub/device/dispatch/*.cuh", | ||
"cub/grid/*.cuh", | ||
"cub/warp/*.cuh", | ||
"cub/warp/specializations/*.cuh", | ||
"cub/iterator/*.cuh", | ||
"cub/thread/*.cuh", | ||
"cub/detail/*.cuh", | ||
Comment on lines
+26
to
+37
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any reason to make the glob so detailed? This prone to be affected by upstream implemtation details change. Why not just |
||
]), | ||
) | ||
|
||
cc_library( | ||
name = "cub", | ||
visibility = ["//visibility:public"], | ||
deps = [":includes"], | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
load("@rules_cc//cc:defs.bzl", "cc_library") | ||
#load("@rules_license//rules:license.bzl", "license") | ||
|
||
#package(default_applicable_licenses = [":license"]) | ||
|
||
#license( | ||
# name = "license", | ||
# license_kinds = [ | ||
# "@rules_license//licenses/spdx:Apache-2.0", | ||
# "@rules_license//licenses/spdx:BSL-1.0", | ||
# ], | ||
# license_text = "LICENSE", | ||
#) | ||
|
||
filegroup( | ||
name = "include-src", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same |
||
srcs = glob([ | ||
"thrust/*.h", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line is redundent. |
||
"thrust/**/*.h", | ||
"thrust/**/*.inl", | ||
]), | ||
) | ||
|
||
cc_library( | ||
name = "includes", | ||
hdrs = [":include-src"], | ||
includes = ["."], | ||
) | ||
|
||
cc_library( | ||
name = "thrust", | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
":includes", | ||
"@cub", | ||
], | ||
) |
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.
They are not mandatory, please move them into
third_party/
also. Otherwise, our core rules depends on not in use remote files. Lets keep them minimal.