Skip to content

Commit 7af5f6d

Browse files
authored
Update lintrunner configs
Differential Revision: D67650459 Pull Request resolved: #7440
1 parent 685a6db commit 7af5f6d

File tree

4 files changed

+15
-14
lines changed

4 files changed

+15
-14
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ We use [`lintrunner`](https://pypi.org/project/lintrunner/) to help make sure th
8080
code follows our standards. Set it up with:
8181

8282
```
83-
pip install lintrunner==0.11.0
84-
pip install lintrunner-adapters==0.11.0
83+
pip install lintrunner==0.12.7
84+
pip install lintrunner-adapters==0.12.4
8585
lintrunner init
8686
```
8787

examples/models/llama/experimental/generate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ def decode_n_tokens(
6767
print(f"cur_token: {cur_token}")
6868
new_tokens, new_probs = [], []
6969
for _ in range(num_new_tokens):
70-
with torch.backends.cuda.sdp_kernel(
71-
enable_flash=False, enable_mem_efficient=False, enable_math=True
70+
with torch.nn.attention.sdpa_kernel(
71+
torch.nn.attention.SDPBackend.MATH
7272
): # Actually better for Inductor to codegen attention here
7373
next_token, next_prob = decode_one_token(
7474
model, cur_token.view(1, -1), **sampling_kwargs

exir/dialects/edge/spec/gen.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -327,14 +327,14 @@ def to_yaml(self) -> Dict[str, Any]:
327327
"type_constraint": type_constraint_yaml,
328328
}
329329
return yaml_dict
330-
except BaseException:
330+
except BaseException as e:
331331
print(
332332
"Operator {} inherited from {} failed convert to yaml".format(
333333
self.func_name, self.inherits
334334
)
335335
)
336336
print(self)
337-
return {}
337+
raise e
338338

339339
def __str__(self) -> str:
340340
my_str: str = "\nop_yaml_info: \n"
@@ -440,7 +440,8 @@ def gen_op_yaml(op_name: str) -> Optional[EdgeOpYamlInfo]:
440440
except BaseException as e:
441441
# Can not find operator schema, or can not find operator based on op_name.
442442
# Return None to append it into unsupport_funcs and skip.
443-
raise RuntimeError(f"Can not find operator schema for {op_name}") from e
443+
print(f"Can not find operator schema for {op_name}")
444+
raise e
444445

445446
valid_type_combinations = try_all_dtypes_input_samples(op_name)
446447

@@ -465,7 +466,7 @@ def gen_op_yaml(op_name: str) -> Optional[EdgeOpYamlInfo]:
465466
# Append it to unsupported_funcs.
466467
print("Failed to create yaml file for current function:", op_name)
467468
print("Error msg:", str(e))
468-
return
469+
raise e
469470

470471
return op_yaml_info
471472

requirements-lintrunner.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
# Lintrunner itself
2-
lintrunner==0.11.0
3-
lintrunner-adapters==0.11.0
2+
lintrunner==0.12.7
3+
lintrunner-adapters==0.12.4
44

55
# Flake 8 and its dependencies
66
flake8==6.1.0
77
flake8-breakpoint==1.1.0
8-
flake8-bugbear==23.9.16
8+
flake8-bugbear==24.4.26
99
flake8-comprehensions==3.14.0
1010
flake8-pyi==23.5.0
1111
mccabe==0.7.0
1212
pycodestyle==2.11.1
13-
torchfix==0.5.0
13+
torchfix==0.6.0
1414

1515
# UFMT
1616
black==24.4.2
17-
ufmt==2.6.0
18-
usort==1.0.5
17+
ufmt==2.8.0
18+
usort==1.0.8.post1
1919

2020
# Other linters
2121
clang-format==18.1.3

0 commit comments

Comments
 (0)