Skip to content

Commit 1f582a4

Browse files
chensuyueintel-zhangyi
authored andcommitted
CI UT enhance (#258)
Signed-off-by: chensuyue <[email protected]>
1 parent 8106d17 commit 1f582a4

File tree

5 files changed

+8
-2
lines changed

5 files changed

+8
-2
lines changed

.azure-pipelines/scripts/ut/run_basic_others.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ sed -i '/ neural_coder\//d' run.sh
2222
sed -i '/ ipex\//d' run.sh
2323
sed -i '/ itex\//d' run.sh
2424

25+
echo "copy model for dynas..."
26+
mkdir -p .torch/ofa_nets || true
27+
cp -r /tf_dataset/ut-localfile/ofa_mbv3_d234_e346_k357_w1.2 .torch/ofa_nets || true
28+
2529
LOG_DIR=/neural-compressor/log_dir
2630
mkdir -p ${LOG_DIR}
2731
ut_log_name=${LOG_DIR}/ut_tf_${tensorflow_version}_pt_${pytorch_version}.log

.azure-pipelines/ut-basic.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ pr:
1111
- neural_compressor
1212
- test
1313
- setup.py
14+
- .azure-pipelines/scripts/ut
1415
exclude:
1516
- neural_compressor/ux
1617
- test/ux

.azure-pipelines/ut-ncoder.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ pr:
1111
- neural_coder
1212
- test/neural_coder
1313
- setup.py
14+
- .azure-pipelines/scripts/ut
1415

1516
pool: ICX-16C
1617

.azure-pipelines/ut-ux.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ pr:
1111
- neural_compressor/ux
1212
- test/ux
1313
- setup.py
14+
- .azure-pipelines/scripts/ut
1415

1516
pool: ICX-16C
1617

test/itex/test_tensorflow_itex_basic.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def build_fake_yaml(fake_yaml, save_path, **kwargs):
2222
class TestItexEnabling(unittest.TestCase):
2323
@classmethod
2424
def setUpClass(self):
25+
os.system("rm *.log")
2526
fake_yaml_1 = '''
2627
model:
2728
name: fake_model_cpu
@@ -238,8 +239,6 @@ def test_itex_benchmark_gpu(self):
238239
relu = tf.nn.relu(add)
239240
relu6 = tf.nn.relu6(relu, name='op_to_store')
240241
out_name = relu6.name.split(':')[0]
241-
num_of_instance = 1
242-
cores_per_instance = 1
243242
with tf.compat.v1.Session() as sess:
244243
sess.run(tf.compat.v1.global_variables_initializer())
245244
output_graph_def = graph_util.convert_variables_to_constants(

0 commit comments

Comments
 (0)