Skip to content

Commit

Permalink
Fix dicp ci of tops.
Browse files Browse the repository at this point in the history
  • Loading branch information
yao-fengchen committed Nov 28, 2023
1 parent 7ec3584 commit ec90916
Show file tree
Hide file tree
Showing 89 changed files with 90 additions and 90 deletions.
Empty file added dicp/dicp/vendor/__init__.py
Empty file.
Empty file added dicp/test/__init__.py
Empty file.
2 changes: 1 addition & 1 deletion dicp/test/common/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import parse_bool_arg
from ..common.utils import parse_bool_arg


def pytest_addoption(parser):
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/model/conftest.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from common.conftest import pytest_addoption, backend, dynamic # noqa F401
from ..common.conftest import pytest_addoption, backend, dynamic # noqa F401
4 changes: 2 additions & 2 deletions dicp/test/model/llama/generation.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from typing import List

import torch
from model.llama.tokenizer import Tokenizer
from model.llama.model import Transformer, precompute_freqs_cis
from ...model.llama.tokenizer import Tokenizer
from ...model.llama.model import Transformer, precompute_freqs_cis


class LLaMA:
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/model/llama/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import torch
from torch import nn
import torch.nn.functional as F
from common.utils import get_device
from ...common.utils import get_device
device = get_device()


Expand Down
6 changes: 3 additions & 3 deletions dicp/test/model/test_llama.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
import torch
import os
import torch._dynamo as dynamo
from common import utils
from ..common import utils
import torch_dipu
import json
from pathlib import Path
from model.llama.generation import Tokenizer, LLaMA
from model.llama.model import Transformer, ModelArgs
from ..model.llama.generation import Tokenizer, LLaMA
from ..model.llama.model import Transformer, ModelArgs
dynamo.config.cache_size_limit = 128
utils.update_dynamo_config(False)
device = utils.get_device()
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/model/test_resnet50.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import mmcls
from mmcv import Config
from mmcls.models import build_classifier
from common import utils
from ..common import utils
import torch_dipu


Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/conftest.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from common.conftest import pytest_addoption, backend, dynamic # noqa F401
from ..common.conftest import pytest_addoption, backend, dynamic # noqa F401
2 changes: 1 addition & 1 deletion dicp/test/op/test__adaptive_avg_pool2d.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test__adaptive_avg_pool2d_backward.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test__log_softmax.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test__native_batch_norm_legit_functional.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test__softmax.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test__unsafe_view.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_abs.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_add.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_alias.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_amax.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_arange.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_bernoulli.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
random,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_bmm.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_cat.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_clone.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_convert_element_type.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_convolution.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_convolution_backward.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_copy.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_copy_.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_div.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_embedding.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_empty_like.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_eq.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_exp.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_expand.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_fill.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
random,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_full.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
random,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_full_like.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
random,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_gather.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_gelu.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_gelu_backward.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_getitem.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
import operator
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_hardswish.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_hardswish_backward.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_index.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_iota.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_le.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
random,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_lift_fresh_copy.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
random,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_log.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_lt.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_masked_fill.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
random,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_max_pool2d_with_indices.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_max_pool2d_with_indices_backward.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_maximum.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_mean.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_mm.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
2 changes: 1 addition & 1 deletion dicp/test/op/test_mul.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from common.utils import (
from ..common.utils import (
torch,
dynamo,
parse_args,
Expand Down
Loading

0 comments on commit ec90916

Please sign in to comment.