Skip to content

Commit 356f0ec

Browse files
weimingzha0yanwei-gr
and
yanwei-gr
authored
update popart api to sdk2.3 & remove custom erf ,already use popart o… (#655) (#656)
* update popart api to sdk2.3 & remove custom erf ,already use popart origin erf Co-authored-by: yanwei <yw01041751@alibaba-inc.com> (cherry picked from commit 4d23a95) Co-authored-by: yanwei-gr <yw01041751@alibaba-inc.com>
1 parent 7f358b9 commit 356f0ec

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

.github/actions/build/build_in_docker.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ DOCKER_ID=`docker ps -aq -f name=$CONTAINER_NAME -f status=running`
3636
gid=$(id -g ${USER})
3737
group=$(id -g -n ${USER})
3838
uid=$(id -u ${USER})
39-
extra_mnt="-v /opt/poplar_sdk-ubuntu_18_04-2.2.2+711-26aba6cf16:/opt/poplar_sdk:ro"
39+
extra_mnt="-v /opt/poplar_sdk-ubuntu_18_04-2.3.0_774:/opt/poplar_sdk:ro"
4040
mkdir -p /tmp/ubuntu.cache
4141
extra_mnt="$extra_mnt -v /tmp/ubuntu.cache:/cache"
4242

.github/workflows/main.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
$image_registry/computation/halo:$image_tag \
7878
/bin/bash -c 'source scl_source enable devtoolset-7 && cd /build && cmake -G Ninja /host/halo -DHALO_USE_TIDY_CHECK=OFF -DHALO_GEN_DOCS=OFF -DODLA_BUILD_POPART_USE_CXX11ABI=OFF -DODLA_BUILD_POPART_CUSTOM_OPS=ON -DODLA_BUILD_TRT=OFF -DODLA_BUILD_XNNPACK=OFF -DODLA_BUILD_EIGEN=OFF -DODLA_BUILD_DNNL=OFF -DHALO_BUILD_RTLIB=OFF -DHALO_USE_STATIC_PROTOBUF=ON -DCPACK_SYSTEM_NAME=centos-i686 && ninja && source /opt/poplar_sdk/poplar/enable.sh && ninja check-halo && ninja package && cp /build/*.bz2 /build/*.rpm /host/output_centos'
7979
env:
80-
poplar_sdk: /opt/poplar_sdk-centos_7_6-2.2.2+711-26aba6cf16
80+
poplar_sdk: /opt/poplar_sdk-centos_7_6-2.3.0_774
8181
repo_name : heterogeneity-aware-lowering-and-optimization
8282
image_registry : registry-intl.us-west-1.aliyuncs.com
8383
image_tag : latest-devel-x86_64-centos7

ODLA/platforms/odla_popart/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ set(POPART_ROOT ${POPART_ROOT} PARENT_SCOPE)
3535

3636
list(APPEND CMAKE_PREFIX_PATH ${POPLAR_ROOT})
3737
list(APPEND CMAKE_PREFIX_PATH ${POPART_ROOT})
38-
find_package(popart 2.2.1... REQUIRED CONFIG COMPONENTS popart-only REQUIRED)
38+
find_package(popart 2.3.0... REQUIRED CONFIG COMPONENTS popart-only REQUIRED)
3939

4040
message(STATUS "Found popart, version: ${popart_VERSION}")
4141

ODLA/platforms/odla_popart/custom_ops/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
# ==============================================================================
1616

1717
add_odla_library(custom_ops SHARED
18-
erf.cc
1918
rsqrt.cc
2019
postprocess.cc
2120
attention_mask.cc

ODLA/platforms/odla_popart/custom_ops/rsqrt.cc

+4-3
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,18 @@ static popart::OpCreator<RsqrtOp> rsqrtOpCreator(popart::OpDefinitions({
5959
class RsqrtOpx : public popart::popx::ElementWiseUnaryOpx {
6060
public:
6161
RsqrtOpx(popart::Op*, popart::popx::Devicex*);
62-
void grow(poplar::program::Sequence&) const final;
62+
void grow(snap::program::Sequence&) const final;
6363
};
6464

6565
RsqrtOpx::RsqrtOpx(popart::Op* op, popart::popx::Devicex* devicex)
6666
: popart::popx::ElementWiseUnaryOpx(op, devicex) {
6767
verifyOp<RsqrtOp>(op, CustomOperators::Rsqrt_1);
6868
}
6969

70-
void RsqrtOpx::grow(poplar::program::Sequence & prog) const {
70+
void RsqrtOpx::grow(snap::program::Sequence & prog) const {
7171
auto result = popops::map(graph().getPoplarGraph(), popops::expr::UnaryOpType::RSQRT,
72-
getInTensor(0).getPoplarTensor(), prog, debugContext());
72+
getInTensor(0).getPoplarTensor(), prog.getPoplarSequence(),
73+
debugContext());
7374
setOutTensor(0, snap::Tensor{result, graph()});
7475
}
7576

0 commit comments

Comments
 (0)