Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion test/auto_parallel/hybrid_strategy/parallel_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,6 @@ def parallel_model(self, layer):
or paddle.device.cuda.get_device_capability()[0] < 8
)
):

bck = 'p2p'
if self.config.context_parallel is True:
bck = 'p2p'
Expand Down
1 change: 0 additions & 1 deletion test/auto_parallel/hybrid_strategy/single_lora_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@ def extra_repr(self):


class LoRAModel(nn.Layer):

def __init__(self, model, lora_config) -> None:
super().__init__()
self.model = self.get_lora_model(model, lora_config)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,6 @@ def forward(
hidden_states = inputs_embeds

for idx, (decoder_layer) in enumerate(self.layers):

layer_outputs = decoder_layer(
hidden_states,
position_ids,
Expand Down Expand Up @@ -505,7 +504,6 @@ def forward(self, hidden_states, tensor_parallel_output=None):


class LlamaForCausalLM(paddle.nn.Layer):

def __init__(
self,
param_prefix="",
Expand Down Expand Up @@ -537,7 +535,6 @@ def forward(
attention_mask=None,
labels=None,
):

outputs = self.llama(
input_ids,
position_ids=position_ids,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@


class TestRefinedRecomputeLlamaAuto(TestRecomputeLlamaAuto):

def run_test_cases(self):
self.config.recompute = True
self.config.recompute_granularity = "full"
Expand Down
1 change: 0 additions & 1 deletion test/auto_parallel/pir/test_op_role.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def test_single(self):
with paddle.pir_utils.IrGuard():
main_program = paddle.base.Program()
with paddle.base.program_guard(main_program):

# op_role = -1
x0 = paddle.static.data(name='x0', shape=[1, 128, 512])
x1 = paddle.nn.functional.relu(x0)
Expand Down
1 change: 0 additions & 1 deletion test/auto_parallel/pir/test_pir_1f1b_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@


class TestPIR1F1BPlan(unittest.TestCase):

def test_standalone_executor_1f1b_plan_stage0(self):
base.set_flags({'FLAGS_enable_pir_api': 1})
config = {"num_micro_batches": 8, "pp_stage": 0, "pp_degree": 4}
Expand Down
1 change: 0 additions & 1 deletion test/auto_parallel/spmd_rules/test_einsum_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

# case: bmm
class TestEinsumSPMDRule(unittest.TestCase):

def setUp(self):
self.init_data()
self.init_parallel_setting()
Expand Down
1 change: 0 additions & 1 deletion test/cinn/fake_model/naive_multi_fc.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
A fake model with multiple FC layers to test CINN on a more complex model.
"""


import paddle
from paddle import static

Expand Down
3 changes: 0 additions & 3 deletions test/collective/new_api_per_op_and_group_intranode.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ def test_scatter(ep_group: Group, mode: str):
m, n = 4096, 8192

if local_rank == 0:

scatter_list = [
paddle.ones(shape=[m, n], dtype=paddle.float32) * (i + 1)
for i in range(num_local_ranks)
Expand Down Expand Up @@ -124,7 +123,6 @@ def test_reduce(ep_group: Group, mode: str):
dist.reduce(gbl_x, dst=0, group=ep_group)

if local_rank == 0:

res = paddle.ones(shape=[m, n], dtype=paddle.float32) * (
num_local_ranks * (num_local_ranks + 1) / 2
)
Expand Down Expand Up @@ -208,7 +206,6 @@ def test_all_reduce(ep_group: Group, mode: str):


def test_primitive():

dist.init_parallel_env()

ranks = [0, 1]
Expand Down
1 change: 1 addition & 0 deletions test/dataset/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
Description:
This script test image resize,flip and chw.
"""

import os
import unittest

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@


class ConditionalBlockTest(unittest.TestCase):

def test_forward(self):
main_program = base.Program()
startup_program = base.Program()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ def test_fit_line_inference_model(self):


class TestSaveInferenceModel(unittest.TestCase):

def test_save_inference_model(self):
root_path = tempfile.TemporaryDirectory()
MODEL_DIR = os.path.join(root_path.name, "inference_model2")
Expand Down
4 changes: 0 additions & 4 deletions test/dygraph_to_static/test_convert_call.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,6 @@ def test_class_patch_api(self):


class TestMarkerUnified(Dy2StTestBase):

def test_plain_function(self):
def fn(x):
return x
Expand Down Expand Up @@ -453,7 +452,6 @@ def fn(x):
def test_nn_layer_subclass_skip_sot_only(self):
@paddle.jit.marker.unified(for_sot=True, for_ast=False)
class MyLayer(paddle.nn.Layer):

def __init__(self):
super().__init__()
self.w = paddle.create_parameter(shape=[1], dtype='float32')
Expand All @@ -476,7 +474,6 @@ def forward(self, x):
def test_nn_layer_subclass_skip_ast_only(self):
@paddle.jit.marker.unified(for_sot=False, for_ast=True)
class MyLayer(paddle.nn.Layer):

def __init__(self):
super().__init__()
self.w = paddle.create_parameter(shape=[1], dtype='float32')
Expand All @@ -499,7 +496,6 @@ def forward(self, x):
def test_nn_layer_subclass_skip_ast_and_sot(self):
@paddle.jit.marker.unified()
class MyLayer(paddle.nn.Layer):

def __init__(self):
super().__init__()
self.w = paddle.create_parameter(shape=[1], dtype='float32')
Expand Down
1 change: 0 additions & 1 deletion test/dygraph_to_static/test_function_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@


class TestFunctionSpec(unittest.TestCase):

def test_constructor(self):
foo_spec = FunctionSpec(foo_func)
args_name = foo_spec.args_name
Expand Down
1 change: 1 addition & 0 deletions test/dygraph_to_static/test_pylayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

"""Tests for PyLayer of Dynamic-to-Static.
Only test simple cases here."""

import sys
from pathlib import Path

Expand Down
1 change: 1 addition & 0 deletions test/ipu/distributed/test_dist_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
--print-topology=yes \
python3.8 test/ipu/distributed/test_dist_sample.py
'''

'''
Multi hosts:
python3.8 -m paddle.distributed.launch \
Expand Down
2 changes: 0 additions & 2 deletions test/ir/inference/auto_scan_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -846,11 +846,9 @@ def random_to_skip():
pir_main_program, startup_program
),
):

feed_dict = {}
feed_data = prog_config.get_feed_data()
for key, value in feed_data.items():

feed_dict[key] = value['data']

place = (
Expand Down
1 change: 0 additions & 1 deletion test/ir/inference/test_inference_predictor_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ def forward(self, x1, x2):
)
class TestPredictorRunWithTensor(unittest.TestCase):
def setUp(self):

self.temp_dir = tempfile.TemporaryDirectory()
net = TestNet()
model = paddle.jit.to_static(
Expand Down
1 change: 0 additions & 1 deletion test/ir/inference/test_trt_convert_argsort.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ def generate_dynamic_shape(self, attrs):
def sample_predictor_configs(
self, program_config, run_pir=False
) -> tuple[paddle_infer.Config, list[int], float]:

def clear_dynamic_shape():
self.dynamic_shape.max_input_shape = {}
self.dynamic_shape.min_input_shape = {}
Expand Down
1 change: 0 additions & 1 deletion test/ir/inference/test_trt_convert_grid_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ def generate_dynamic_shape(self, attrs):
def sample_predictor_configs(
self, program_config, run_pir=False
) -> tuple[paddle_infer.Config, list[int], float]:

def clear_dynamic_shape():
self.dynamic_shape.max_input_shape = {}
self.dynamic_shape.min_input_shape = {}
Expand Down