Skip to content

Commit

Permalink
change the weight sharing script name (#461)
Browse files Browse the repository at this point in the history
  • Loading branch information
leslie-fang-intel committed Mar 9, 2022
1 parent f64cf80 commit fb5c37d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ if [ "$weight_sharing" = true ]; then

echo "### running on instance 0, numa node $numa_node_i, core list {$start_core_i, $end_core_i}..."
numactl --physcpubind=$start_core_i-$end_core_i --membind=$numa_node_i python -u \
${MODEL_DIR}/models/object_detection/pytorch/ssd-resnet34/inference/cpu/infer_tb.py \
${MODEL_DIR}/models/object_detection/pytorch/ssd-resnet34/inference/cpu/infer_weight_sharing.py \
--data ${DATASET_DIR}/coco \
--device 0 \
--checkpoint ${CHECKPOINT_DIR}/pretrained/resnet34-ssd1200.pth \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,13 @@ CORES_PER_INSTANCE=4

INSTANCES_THROUGHPUT_BENCHMARK_PER_SOCKET=`expr $CORES / $CORES_PER_INSTANCE`

weight_sharing=false
weight_sharing=true
if [ -z "${WEIGHT_SHAREING}" ]; then
weight_sharing=false
else
echo "### Running the test with runtime extension."
weight_sharing=true
fi

if [ "$weight_sharing" = true ]; then
SOCKETS=`lscpu | grep Socket | awk '{print $2}'`
Expand All @@ -83,7 +89,7 @@ if [ "$weight_sharing" = true ]; then
python -m intel_extension_for_pytorch.cpu.launch \
--use_default_allocator \
--ninstance ${SOCKETS} \
${MODEL_DIR}/models/object_detection/pytorch/ssd-resnet34/inference/cpu/infer_tb.py \
${MODEL_DIR}/models/object_detection/pytorch/ssd-resnet34/inference/cpu/infer_weight_sharing.py \
--data ${DATASET_DIR}/coco \
--device 0 \
--checkpoint ${CHECKPOINT_DIR}/pretrained/resnet34-ssd1200.pth \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ if [ "$weight_sharing" = true ]; then

echo "### running on instance $i, numa node $numa_node_i, core list {$start_core_i, $end_core_i}..."
numactl --physcpubind=$start_core_i-$end_core_i --membind=$numa_node_i python -u \
${MODEL_DIR}/models/object_detection/pytorch/ssd-resnet34/inference/cpu/infer_tb.py \
${MODEL_DIR}/models/object_detection/pytorch/ssd-resnet34/inference/cpu/infer_weight_sharing.py \
--data ${DATASET_DIR}/coco \
--device 0 \
--checkpoint ${CHECKPOINT_DIR}/pretrained/resnet34-ssd1200.pth \
Expand Down

0 comments on commit fb5c37d

Please sign in to comment.