Skip to content

Commit 7a12b50

Browse files
CodemodService FBSourceBuckFormatLinterBotfacebook-github-bot
authored andcommitted
[AutoAccept][Codemod][FBSourceBuckFormatLinter] Daily arc lint --take BUCKFORMAT
Reviewed By: zertosh Differential Revision: D33119794 fbshipit-source-id: ca327caf34560c0bba32511e57d5dc18b71bdfe1
1 parent 59000cf commit 7a12b50

File tree

1 file changed

+24
-21
lines changed

1 file changed

+24
-21
lines changed

aten.bzl

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
load("@rules_cc//cc:defs.bzl", "cc_library")
21
load("@bazel_skylib//lib:paths.bzl", "paths")
2+
load("@rules_cc//cc:defs.bzl", "cc_library")
33

44
CPU_CAPABILITY_NAMES = ["DEFAULT", "AVX2"]
55
CAPABILITY_COMPILER_FLAGS = {
@@ -47,34 +47,37 @@ def intern_build_aten_ops(copts, deps):
4747
def generate_aten_impl(ctx):
4848
# Declare the entire ATen/ops/ directory as an output
4949
ops_dir = ctx.actions.declare_directory("aten/src/ATen/ops")
50-
outputs=[ops_dir] + ctx.outputs.outs
50+
outputs = [ops_dir] + ctx.outputs.outs
5151

5252
install_dir = paths.dirname(ops_dir.path)
53-
tool_inputs, tool_inputs_manifest = ctx.resolve_tools(tools=[ctx.attr.generator])
53+
tool_inputs, tool_inputs_manifest = ctx.resolve_tools(tools = [ctx.attr.generator])
5454
ctx.actions.run_shell(
55-
outputs=outputs,
56-
inputs=ctx.files.srcs,
57-
command=ctx.executable.generator.path + " $@",
58-
arguments=["--source-path", "aten/src/ATen",
59-
"--per-operator-headers",
60-
"--install_dir", install_dir],
61-
tools=tool_inputs,
62-
input_manifests=tool_inputs_manifest,
63-
use_default_shell_env=True,
55+
outputs = outputs,
56+
inputs = ctx.files.srcs,
57+
command = ctx.executable.generator.path + " $@",
58+
arguments = [
59+
"--source-path",
60+
"aten/src/ATen",
61+
"--per-operator-headers",
62+
"--install_dir",
63+
install_dir,
64+
],
65+
tools = tool_inputs,
66+
input_manifests = tool_inputs_manifest,
67+
use_default_shell_env = True,
6468
)
65-
return [DefaultInfo(files=depset(outputs))]
66-
69+
return [DefaultInfo(files = depset(outputs))]
6770

6871
generate_aten = rule(
6972
implementation = generate_aten_impl,
7073
attrs = {
71-
"outs": attr.output_list(),
72-
"srcs": attr.label_list(allow_files=True),
7374
"generator": attr.label(
74-
executable=True,
75-
allow_files=True,
76-
mandatory=True,
77-
cfg="exec",
75+
executable = True,
76+
allow_files = True,
77+
mandatory = True,
78+
cfg = "exec",
7879
),
79-
}
80+
"outs": attr.output_list(),
81+
"srcs": attr.label_list(allow_files = True),
82+
},
8083
)

0 commit comments

Comments
 (0)