Skip to content

Commit

Permalink
Add pytest nightly marker for CI (#551)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsudhakarTT authored Nov 7, 2024
1 parent 535a25f commit 7972a6a
Show file tree
Hide file tree
Showing 89 changed files with 193 additions and 0 deletions.
2 changes: 2 additions & 0 deletions forge/test/model_demos/high_prio/cnn/onnx/test_ddrnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@


@pytest.mark.parametrize("variant", variants)
@pytest.mark.nightly
def test_ddrnet(variant, test_device):

# STEP 1: Set Forge configuration parameters
Expand Down Expand Up @@ -76,6 +77,7 @@ def test_ddrnet(variant, test_device):


@pytest.mark.parametrize("variant", variants)
@pytest.mark.nightly
def test_ddrnet_semantic_segmentation_onnx(variant, test_device):

# Set Forge configuration parameters
Expand Down
1 change: 1 addition & 0 deletions forge/test/model_demos/high_prio/cnn/onnx/test_dla.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@


@pytest.mark.parametrize("variant", variants)
@pytest.mark.nightly
def test_dla_onnx(test_device, variant):
compiler_cfg = forge.config._get_global_compiler_config()
compiler_cfg.balancer_policy = "Ribbon"
Expand Down
1 change: 1 addition & 0 deletions forge/test/model_demos/high_prio/cnn/onnx/test_fpn.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from forge import VerifyConfig


@pytest.mark.nightly
def test_fpn_onnx(test_device, test_kind):
compiler_cfg = forge.config._get_global_compiler_config()
compiler_cfg.balancer_policy = "Ribbon"
Expand Down
1 change: 1 addition & 0 deletions forge/test/model_demos/high_prio/cnn/onnx/test_hardnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@


@pytest.mark.parametrize("variant", variants)
@pytest.mark.nightly
def test_hardnet_onnx(variant, test_device):

# Set Forge configuration parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from test.utils import download_model


@pytest.mark.nightly
def test_lstm_genom_onnx(test_device):
load_path = "third_party/confidential_customer_models/model_2/onnx/lstm_genom/lstm-genom-model.onnx"
model = onnx.load(load_path)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from forge.verify.config import TestKind


@pytest.mark.nightly
def test_lstm_valence_onnx(test_device):
# Load model checkpoint from HuggingFace
load_path = "third_party/confidential_customer_models/model_2/onnx/lstm_valence/lstm-valence-model.onnx"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def get_sample_data(model_name):
"deepmind/vision-perceiver-fourier",
],
)
@pytest.mark.nightly
def test_perceiver_for_image_classification_onnx(test_device, model_name):

# Set Forge configuration parameters
Expand Down
2 changes: 2 additions & 0 deletions forge/test/model_demos/high_prio/cnn/onnx/test_retinanet.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def img_preprocess(scal_val=1):
#########


@pytest.mark.nightly
def test_retinanet_r101_640x480_onnx(test_device):
os.environ["FORGE_DECOMPOSE_SIGMOID"] = "1"
os.environ["FORGE_DISABLE_CONV_MULTI_OP_FRACTURE"] = "1"
Expand Down Expand Up @@ -120,6 +121,7 @@ def img_preprocessing():


@pytest.mark.parametrize("variant", variants)
@pytest.mark.nightly
def test_retinanet_onnx(variant, test_device):

# Set Forge configuration parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def get_sample_data(model_name):


@pytest.mark.parametrize("variant", variants_img_classification)
@pytest.mark.nightly
def test_segformer_image_classification_onnx(test_device, variant):

# Set Forge configuration parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def get_sample_data(model_name):


@pytest.mark.parametrize("variant", variants_semseg)
@pytest.mark.nightly
def test_segformer_semantic_segmentation_onnx(test_device, variant):

# Set Forge configuration parameters
Expand Down
2 changes: 2 additions & 0 deletions forge/test/model_demos/high_prio/cnn/onnx/test_yolo_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def preprocess(img):


@pytest.mark.skip(reason="While loop in model, not supported yet")
@pytest.mark.nightly
def test_yolov3_tiny_onnx(test_device):
# STEP 1: Set Forge configuration parameters
compiler_cfg = forge.config._get_global_compiler_config() # load global compiler config object
Expand Down Expand Up @@ -78,6 +79,7 @@ def test_yolov3_tiny_onnx(test_device):


@pytest.mark.skip(reason="While loop in model, not supported yet")
@pytest.mark.nightly
def test_yolov3_onnx(test_device):
# STEP 1: Set Forge configuration parameters
compiler_cfg = forge.config._get_global_compiler_config() # load global compiler config object
Expand Down
3 changes: 3 additions & 0 deletions forge/test/model_demos/high_prio/cnn/onnx/test_yolo_v5.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def data_preprocessing(ims: Image.Image, size: tuple) -> tuple:


@pytest.mark.parametrize("variant", variants)
@pytest.mark.nightly
def test_yolo_v5_320x320_onnx(test_device, variant):

# forge configuration parameters
Expand Down Expand Up @@ -103,6 +104,7 @@ def test_yolo_v5_320x320_onnx(test_device, variant):


@pytest.mark.parametrize("variant", variants)
@pytest.mark.nightly
def test_yolo_v5_480x480_onnx(test_device, variant):

# forge configuration parameters
Expand Down Expand Up @@ -183,6 +185,7 @@ def test_yolo_v5_480x480_onnx(test_device, variant):


@pytest.mark.parametrize("variant", variants)
@pytest.mark.nightly
def test_yolo_v5_640x640_onnx(test_device, variant):

# forge configuration parameters
Expand Down
1 change: 1 addition & 0 deletions forge/test/model_demos/high_prio/cnn/onnx/test_yolo_x.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def preprocess(img, input_size, swap=(2, 0, 1)):


@pytest.mark.parametrize("variant", variants)
@pytest.mark.nightly
def test_yolox_onnx(variant, test_device):

# forge configuration parameters
Expand Down
2 changes: 2 additions & 0 deletions forge/test/model_demos/high_prio/cnn/pytorch/test_alexnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import os


@pytest.mark.nightly
def test_alexnet_torchhub(test_device):
# Configurations
compiler_cfg = forge.config._get_global_compiler_config()
Expand Down Expand Up @@ -45,6 +46,7 @@ def test_alexnet_torchhub(test_device):
compiled_model = forge.compile(framework_model, sample_inputs=inputs, module_name="pt_alexnet_torchhub")


@pytest.mark.nightly
def test_alexnet_osmr(test_device):
# Configurations
compiler_cfg = forge.config._get_global_compiler_config()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def forward(self, x):
return act


@pytest.mark.nightly
def test_conv_ae_pytorch(test_device):
# Set Forge configuration parameters
compiler_cfg = forge.config._get_global_compiler_config()
Expand All @@ -113,6 +114,7 @@ def test_conv_ae_pytorch(test_device):
compiled_model = forge.compile(model, sample_inputs=[sample_tensor], module_name="pt_conv_ae")


@pytest.mark.nightly
def test_linear_ae_pytorch(test_device):
# Set Forge configuration parameters
compiler_cfg = forge.config._get_global_compiler_config()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@


@pytest.mark.skip(reason="dependent on CCM repo")
@pytest.mark.nightly
def test_blazepose_detector_pytorch(test_device):
# Set Forge configuration parameters
compiler_cfg = forge.config._get_global_compiler_config()
Expand All @@ -41,6 +42,7 @@ def test_blazepose_detector_pytorch(test_device):


@pytest.mark.skip(reason="dependent on CCM repo")
@pytest.mark.nightly
def test_blazepose_regressor_pytorch(test_device):
# Set Forge configuration parameters
compiler_cfg = forge.config._get_global_compiler_config()
Expand All @@ -54,6 +56,7 @@ def test_blazepose_regressor_pytorch(test_device):


@pytest.mark.skip(reason="dependent on CCM repo")
@pytest.mark.nightly
def test_blaze_palm_pytorch(test_device):

# Set Forge configuration parameters
Expand All @@ -77,6 +80,7 @@ def test_blaze_palm_pytorch(test_device):


@pytest.mark.skip(reason="dependent on CCM repo")
@pytest.mark.nightly
def test_blaze_hand_pytorch(test_device):

# Set Forge configuration parameters
Expand Down
1 change: 1 addition & 0 deletions forge/test/model_demos/high_prio/cnn/pytorch/test_bts.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

@pytest.mark.skip(reason="dependent on CCM repo")
@pytest.mark.parametrize("variant", variants, ids=variants)
@pytest.mark.nightly
def test_bts_pytorch(test_device, variant):

# Set PyBuda configuration parameters
Expand Down
1 change: 1 addition & 0 deletions forge/test/model_demos/high_prio/cnn/pytorch/test_clip.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def forward(self, input_ids, vision_outputs, last_hidden_state, *encoder_outputs
return output


@pytest.mark.nightly
def test_clip_pytorch(test_device):

# Set Forge configuration parameters
Expand Down
2 changes: 2 additions & 0 deletions forge/test/model_demos/high_prio/cnn/pytorch/test_ddrnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

@pytest.mark.skip(reason="dependent on CCM repo")
@pytest.mark.parametrize("variant", variants)
@pytest.mark.nightly
def test_ddrnet_pytorch(variant, test_device):

# STEP 1: Set Forge configuration parameters
Expand Down Expand Up @@ -69,6 +70,7 @@ def test_ddrnet_pytorch(variant, test_device):

@pytest.mark.skip(reason="dependent on CCM repo")
@pytest.mark.parametrize("variant", variants)
@pytest.mark.nightly
def test_ddrnet_semantic_segmentation_pytorch(variant, test_device):

# Set Forge configuration parameters
Expand Down
1 change: 1 addition & 0 deletions forge/test/model_demos/high_prio/cnn/pytorch/test_deit.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@


@pytest.mark.parametrize("variant", variants, ids=variants)
@pytest.mark.nightly
def test_vit_base_classify_224_hf_pytorch(variant, test_device):
model, inputs, _ = generate_model_deit_imgcls_hf_pytorch(
variant,
Expand Down
4 changes: 4 additions & 0 deletions forge/test/model_demos/high_prio/cnn/pytorch/test_densenet.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def get_input_img_hf_xray():


@pytest.mark.parametrize("variant", variants, ids=variants)
@pytest.mark.nightly
def test_densenet_121_pytorch(variant, test_device):

# STEP 1: Set Forge configuration parameters
Expand All @@ -104,6 +105,7 @@ def test_densenet_121_pytorch(variant, test_device):
compiled_model = forge.compile(model, sample_inputs=inputs, module_name=f"pt_{variant_name}")


@pytest.mark.nightly
def test_densenet_161_pytorch(test_device):

# STEP 1: Set Forge configuration parameters
Expand All @@ -120,6 +122,7 @@ def test_densenet_161_pytorch(test_device):
compiled_model = forge.compile(model, sample_inputs=inputs, module_name="pt_densenet_161")


@pytest.mark.nightly
def test_densenet_169_pytorch(test_device):

# STEP 1: Set Forge configuration parameters
Expand All @@ -136,6 +139,7 @@ def test_densenet_169_pytorch(test_device):
compiled_model = forge.compile(model, sample_inputs=inputs, module_name="pt_densenet_169")


@pytest.mark.nightly
def test_densenet_201_pytorch(test_device):

# STEP 1: Set Forge configuration parameters
Expand Down
1 change: 1 addition & 0 deletions forge/test/model_demos/high_prio/cnn/pytorch/test_dla.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@


@pytest.mark.parametrize("variant", variants, ids=variants)
@pytest.mark.nightly
def test_dla_pytorch(variant, test_device):
# Forge configuration parameters
compiler_cfg = forge.config._get_global_compiler_config()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@


@pytest.mark.parametrize("variant", variants)
@pytest.mark.nightly
def test_efficientnet_timm(variant, test_device):

# Configuration
Expand Down Expand Up @@ -81,6 +82,7 @@ def get_state_dict(self, *args, **kwargs):
]


@pytest.mark.nightly
@pytest.mark.parametrize("variant", variants)
def test_efficientnet_torchvision(variant, test_device):
# Configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def get_image_tensor(wh):


@pytest.mark.skip(reason="dependent on CCM repo")
@pytest.mark.nightly
def test_efficientnet_lite_0_pytorch():
# STEP 1: Set Forge configuration parameters
compiler_cfg = forge.config._get_global_compiler_config()
Expand All @@ -50,6 +51,7 @@ def test_efficientnet_lite_0_pytorch():


@pytest.mark.skip(reason="dependent on CCM repo")
@pytest.mark.nightly
def test_efficientnet_lite_1_pytorch(test_device):

# STEP 1: Set Forge configuration parameters
Expand All @@ -70,6 +72,7 @@ def test_efficientnet_lite_1_pytorch(test_device):


@pytest.mark.skip(reason="dependent on CCM repo")
@pytest.mark.nightly
def test_efficientnet_lite_2_pytorch(test_device):

# STEP 1: Set Forge configuration parameters
Expand All @@ -89,6 +92,7 @@ def test_efficientnet_lite_2_pytorch(test_device):


@pytest.mark.skip(reason="dependent on CCM repo")
@pytest.mark.nightly
def test_efficientnet_lite_3_pytorch(test_device):

# STEP 1: Set Forge configuration parameters
Expand All @@ -108,6 +112,7 @@ def test_efficientnet_lite_3_pytorch(test_device):


@pytest.mark.skip(reason="dependent on CCM repo")
@pytest.mark.nightly
def test_efficientnet_lite_4_pytorch(test_device):

# STEP 1: Set Forge configuration parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@


@pytest.mark.skip(reason="dependent on CCM repo")
@pytest.mark.nightly
def test_fchardnet(test_device):
# STEP 1: Set PyBuda configuration parameters
compiler_cfg = forge.config._get_global_compiler_config()
Expand Down
1 change: 1 addition & 0 deletions forge/test/model_demos/high_prio/cnn/pytorch/test_fpn.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def forward(self, feat0, feat1, feat2):
return self.fpn(x)


@pytest.mark.nightly
def test_fpn_pytorch(test_device):
compiler_cfg = forge.config._get_global_compiler_config()
compiler_cfg.compile_depth = forge.CompileDepth.SPLIT_GRAPH
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@


@pytest.mark.parametrize("variant", variants, ids=variants)
@pytest.mark.nightly
def test_ghostnet_timm(variant, test_device):
model, inputs = generate_model_ghostnet_imgcls_timm(variant)
compiled_model = forge.compile(model, sample_inputs=inputs, module_name=f"pt_{variant}")
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import os


@pytest.mark.nightly
def test_googlenet_pytorch(test_device):
# Set Forge configuration parameters
compiler_cfg = forge.config._get_global_compiler_config() # load global compiler config object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

@pytest.mark.skip(reason="dependent on CCM repo")
@pytest.mark.parametrize("variant", variants)
@pytest.mark.nightly
def test_hardnet_pytorch(test_device, variant):

# STEP 1: Set Forge configuration parameters
Expand Down
2 changes: 2 additions & 0 deletions forge/test/model_demos/high_prio/cnn/pytorch/test_hrnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def generate_model_hrnet_imgcls_osmr_pytorch(variant):


@pytest.mark.parametrize("variant", variants, ids=variants)
@pytest.mark.nightly
def test_hrnet_osmr_pytorch(test_device, variant):
model, inputs, _ = generate_model_hrnet_imgcls_osmr_pytorch(
variant,
Expand Down Expand Up @@ -147,6 +148,7 @@ def generate_model_hrnet_imgcls_timm_pytorch(variant):


@pytest.mark.parametrize("variant", variants, ids=variants)
@pytest.mark.nightly
def test_hrnet_timm_pytorch(test_device, variant):
model, inputs, _ = generate_model_hrnet_imgcls_timm_pytorch(
variant,
Expand Down
Loading

0 comments on commit 7972a6a

Please sign in to comment.