Skip to content

Commit 1dae45f

Browse files
committed
[NFC] Fix few lint issues
1 parent f85cd45 commit 1dae45f

File tree

3 files changed

+14
-22
lines changed

3 files changed

+14
-22
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ on:
1414
schedule:
1515
- cron: '0 0 * * *'
1616

17+
permissions:
18+
contents: read
19+
1720
jobs:
1821
test:
1922
runs-on: ubuntu-22.04

backend/server.py

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,23 @@
1-
# FIXME: remove imports used on previous stages of development.
2-
from fastapi import FastAPI
3-
from fastapi.middleware.cors import CORSMiddleware
4-
from pydantic import BaseModel
5-
from typing import List, Optional, Tuple
6-
7-
import torch
8-
import torch.nn as nn
9-
from torch_mlir import fx
10-
from torch_mlir.compiler_utils import run_pipeline_with_repro_report
11-
from torch_mlir.fx import OutputType
12-
131
import subprocess
142
import tempfile
15-
import triton
16-
import triton.language as tl
17-
import triton.compiler
18-
import ast
19-
import inspect
203
import os
214
import glob
225
import uuid
236
import hashlib
247
import shutil
258
import atexit
26-
import shutil
27-
28-
import io
29-
import sys
9+
from typing import List, Optional, Tuple
3010
from contextlib import redirect_stdout, redirect_stderr
3111

12+
from fastapi import FastAPI
13+
from fastapi.middleware.cors import CORSMiddleware
14+
from pydantic import BaseModel
15+
16+
import torch
17+
import torch.nn as nn
18+
from torch_mlir import fx
19+
from torch_mlir.fx import OutputType
20+
3221
app = FastAPI()
3322

3423
app.add_middleware(

tests/test_torch_custom_pipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def test_torch_custom_pipeline(ir_type):
3939
output = response.json()["output"]
4040

4141
assert "===== Initial IR =====" in output
42-
assert "llvm.func @main(%arg0: !llvm.ptr, %arg1: !llvm.ptr, %arg2: i64, %arg3: i64, %arg4: i64, %arg5: i64, %arg6: i64)"
42+
assert "llvm.func @main(%arg0: !llvm.ptr, %arg1: !llvm.ptr, %arg2: i64, %arg3: i64, %arg4: i64, %arg5: i64, %arg6: i64)" in output
4343
assert "===== IR after mlir-translate --mlir-to-llvmir =====" in output
4444
assert "define { ptr, ptr, i64, [2 x i64], [2 x i64] } @main" in output
4545
assert "===== IR after llc -mtriple=nvptx64 =====" in output

0 commit comments

Comments
 (0)