Skip to content

Commit 7940c75

Browse files
authored
Added Power support (#2129)
* Added Power support Signed-off-by: Pankhudi Jain <[email protected]> * Changed rules_python version to 0.31.0 --------- Signed-off-by: Pankhudi Jain <[email protected]>
1 parent d8c8c32 commit 7940c75

File tree

3 files changed

+28
-4
lines changed

3 files changed

+28
-4
lines changed

WORKSPACE

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,15 @@ http_archive(
107107

108108
http_archive(
109109
name = "rules_python",
110-
sha256 = "84aec9e21cc56fbc7f1335035a71c850d1b9b5cc6ff497306f84cced9a769841",
111-
strip_prefix = "rules_python-0.23.1",
112-
url = "https://github.com/bazelbuild/rules_python/releases/download/0.23.1/rules_python-0.23.1.tar.gz",
110+
sha256 = "c68bdc4fbec25de5b5493b8819cfc877c4ea299c0dcb15c244c5a00208cde311",
111+
strip_prefix = "rules_python-0.31.0",
112+
url = "https://github.com/bazelbuild/rules_python/releases/download/0.31.0/rules_python-0.31.0.tar.gz",
113113
)
114114

115+
load("@rules_python//python:repositories.bzl", "py_repositories")
116+
117+
py_repositories()
118+
115119
load("@rules_python//python:repositories.bzl", "python_register_toolchains")
116120
load(
117121
"@org_tensorflow//tensorflow/tools/toolchains/python:python_repo.bzl",

third_party/aws-checksums.BUILD

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,25 @@ cc_library(
2424
deps = [],
2525
)
2626

27+
config_setting(
28+
name = "ppc_cpu",
29+
values = {"cpu": "ppc"},
30+
)
31+
2732
genrule(
2833
name = "crc_hw_c",
2934
outs = ["crc_hw.c"],
30-
cmd = "\n".join([
35+
cmd = select({
36+
"//:ppc_cpu": "\n".join([
37+
"cat <<'EOF' >$@",
38+
"#include <aws/checksums/private/cpuid.h>",
39+
"#include <aws/checksums/private/crc_priv.h>",
40+
"uint32_t aws_checksums_crc32c_hw(const uint8_t *input, int length, uint32_t previousCrc32) {",
41+
" return aws_checksums_crc32c_sw(input, length, previousCrc32);",
42+
"}",
43+
"EOF",
44+
]),
45+
"//conditions:default": "\n".join([
3146
"cat <<'EOF' >$@",
3247
"#include <aws/checksums/private/cpuid.h>",
3348
"#include <aws/checksums/private/crc_priv.h>",
@@ -39,4 +54,6 @@ genrule(
3954
"}",
4055
"EOF",
4156
]),
57+
}),
4258
)
59+

third_party/pulsar.BUILD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ cc_library(
3939
"@platforms//cpu:x86_64": [
4040
"lib/checksum/crc32c_sse42.cc",
4141
],
42+
"@platforms//cpu:ppc": [
43+
"lib/checksum/crc32c_sse42.cc",
44+
],
4245
"//conditions:default": [],
4346
}),
4447
hdrs = [

0 commit comments

Comments
 (0)