Skip to content

Commit c59ae86

Browse files
committed
bsan failing here already
1 parent 755a8e0 commit c59ae86

3 files changed

Lines changed: 49 additions & 46 deletions

File tree

BUILD.bazel

Lines changed: 39 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
22
load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
33
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test")
4-
load("@rules_cuda//cuda:defs.bzl", "cuda_library", "requires_cuda")
4+
# load("@rules_cuda//cuda:defs.bzl", "cuda_library", "requires_cuda")
5+
56

67
copy_file(
78
name = "highs-config",
@@ -10,42 +11,42 @@ copy_file(
1011
visibility = ["//visibility:public"],
1112
)
1213

13-
bool_flag(
14-
name = "cupdlp_gpu",
15-
build_setting_default = False,
16-
visibility = ["//visibility:public"],
17-
)
14+
# bool_flag(
15+
# name = "cupdlp_gpu",
16+
# build_setting_default = False,
17+
# visibility = ["//visibility:public"],
18+
# )
1819

19-
config_setting(
20-
name = "cupdlp_gpu_enabled",
21-
flag_values = {
22-
"@rules_cuda//cuda:enable": "True",
23-
"@local_cuda//:valid_toolchain_found": "True",
24-
":cupdlp_gpu": "True",
25-
},
26-
)
20+
# config_setting(
21+
# name = "cupdlp_gpu_enabled",
22+
# flag_values = {
23+
# "@rules_cuda//cuda:enable": "True",
24+
# "@local_cuda//:valid_toolchain_found": "True",
25+
# ":cupdlp_gpu": "True",
26+
# },
27+
# )
2728

2829
cc_library(
2930
name = "config",
3031
srcs = ["HConfig.h"],
3132
visibility = ["//visibility:public"],
3233
)
3334

34-
cuda_library(
35-
name = "cupdlp",
36-
srcs = glob([
37-
"highs/pdlp/cupdlp/cuda/*.cu",
38-
]),
39-
hdrs = glob([
40-
"highs/pdlp/cupdlp/cuda/*.cuh",
41-
]),
42-
defines = ["CUPDLP_GPU"],
43-
target_compatible_with = requires_cuda(),
44-
deps = [
45-
"@local_cuda//:cublas",
46-
"@local_cuda//:cusparse",
47-
],
48-
)
35+
# cuda_library(
36+
# name = "cupdlp",
37+
# srcs = glob([
38+
# "highs/pdlp/cupdlp/cuda/*.cu",
39+
# ]),
40+
# hdrs = glob([
41+
# "highs/pdlp/cupdlp/cuda/*.cuh",
42+
# ]),
43+
# defines = ["CUPDLP_GPU"],
44+
# target_compatible_with = requires_cuda(),
45+
# deps = [
46+
# "@local_cuda//:cublas",
47+
# "@local_cuda//:cusparse",
48+
# ],
49+
# )
4950

5051
cc_library(
5152
name = "highs",
@@ -82,10 +83,10 @@ cc_library(
8283
"-Wno-unused-but-set-variable",
8384
],
8485
}),
85-
defines = select({
86-
":cupdlp_gpu_enabled": ["CUPDLP_GPU"],
87-
"//conditions:default": ["CUPDLP_CPU"],
88-
}),
86+
# defines = select({
87+
# # ":cupdlp_gpu_enabled": ["CUPDLP_GPU"],
88+
# "//conditions:default": ["CUPDLP_CPU"],
89+
# }),
8990
includes = [
9091
"extern",
9192
# "extern/filereaderlp",
@@ -112,10 +113,11 @@ cc_library(
112113
deps = [
113114
"//:config",
114115
"@zlib",
115-
] + select({
116-
":cupdlp_gpu_enabled": [":cupdlp"],
117-
"//conditions:default": [],
118-
}),
116+
]
117+
# + select({
118+
# ":cupdlp_gpu_enabled": [":cupdlp"],
119+
# "//conditions:default": [],
120+
# }),
119121
)
120122

121123
cc_library(

MODULE.bazel

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ bazel_dep(
2020
version = "1.3.1.bcr.5",
2121
)
2222

23-
bazel_dep(
24-
name = "rules_cuda",
25-
version = "0.2.5",
26-
)
23+
# bazel_dep(
24+
# name = "rules_cuda",
25+
# version = "0.2.5",
26+
# )
2727

28-
local_cuda = use_extension("@rules_cuda//cuda:extensions.bzl", "toolchain")
29-
local_cuda.local_toolchain(
30-
toolkit_path = "",
31-
)
32-
use_repo(local_cuda, "local_cuda")
28+
# local_cuda = use_extension("@rules_cuda//cuda:extensions.bzl", "toolchain")
29+
# local_cuda.local_toolchain(
30+
# toolkit_path = "",
31+
# )
32+
# use_repo(local_cuda, "local_cuda")

highs/HConfig.h.bazel.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#define FAST_BUILD
55
/* #undef ZLIB_FOUND */
6+
#define CUPDLP_CPU
67
#define CMAKE_BUILD_TYPE "RELEASE"
78
#define HiGHSRELEASE
89
/* #undef HIGHSINT64 */

0 commit comments

Comments
 (0)