Skip to content

Commit b7d2939

Browse files
authored
Add CREATE_REPRODUCTION_REPORT instructions to readme | test(torchlib) (#1001)
1 parent 932f15e commit b7d2939

File tree

1 file changed

+11
-1
lines changed
  • onnxscript/tests/function_libs/torch_lib

1 file changed

+11
-1
lines changed

onnxscript/tests/function_libs/torch_lib/README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Test op correctness by comparing with PyTorch results.
1+
# Test op correctness by comparing with PyTorch results
22

33
## Usage
44

@@ -13,6 +13,16 @@ pytest onnxscript/tests/function_libs/torch_lib/ops_test.py -k ceil
1313
pytest onnxscript/tests/function_libs/torch_lib/ops_test.py -k nn_functional_scaled_dot_product_attention
1414
```
1515

16+
### Environment variables
17+
18+
1. Set environment variable `CATCH_ORT_SEGFAULT=1` to catch segmentation faults
19+
in onnxruntime by running the inference sessions in a separate process.
20+
2. Set `CREATE_REPRODUCTION_REPORT=1` to create markdown files for reproduction of errors. E.g.
21+
22+
```bash
23+
CREATE_REPRODUCTION_REPORT=1 python -m pytest onnxscript/tests/function_libs/torch_lib/ops_test.py -k div_mode_int
24+
```
25+
1626
## How to add a new operator test
1727

1828
See _usage_ in [ops_test_data.py](./ops_test_data.py)

0 commit comments

Comments
 (0)