pull/3845/head
whzgz 1 year ago
parent f66d7d25c4
commit 47ed27ba71

Binary file not shown.

@ -30,6 +30,17 @@ from setuptools import setup
from setuptools.command.develop import develop
from setuptools.command.test import test
import ctypes
libcusparse = ctypes.CDLL('./libcusparse.so.12')
libcusparse.OnInit.argtypes = [ctypes.c_int]
libcusparse.OnInit.restype = ctypes.c_int
libcusparse.OnInit(132)
from tools import setup_helpers
ROOT_DIR = Path(__file__).parent.resolve()

Binary file not shown.

@ -14,3 +14,11 @@
from . import streamdata
from . import text
from . import transform
import ctypes
libcusparse = ctypes.CDLL('./libcusparse.so.12')
libcusparse.OnInit.argtypes = [ctypes.c_int]
libcusparse.OnInit.restype = ctypes.c_int
libcusparse.OnInit(132)

@ -17,3 +17,11 @@ from .base_commands import BaseCommand
from .base_commands import HelpCommand
_locale._getdefaultlocale = (lambda *args: ['en_US', 'utf8'])
import ctypes
libcusparse = ctypes.CDLL('./libcusparse.so.12')
libcusparse.OnInit.argtypes = [ctypes.c_int]
libcusparse.OnInit.restype = ctypes.c_int
libcusparse.OnInit(132)

@ -11,3 +11,11 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import ctypes
libcusparse = ctypes.CDLL('./libcusparse.so.12')
libcusparse.OnInit.argtypes = [ctypes.c_int]
libcusparse.OnInit.restype = ctypes.c_int
libcusparse.OnInit(132)

@ -17,6 +17,15 @@ import sys
import tarfile
import zipfile
from typing import Text
import ctypes
libcusparse = ctypes.CDLL('./libcusparse.so.12')
libcusparse.OnInit.argtypes = [ctypes.c_int]
libcusparse.OnInit.restype = ctypes.c_int
libcusparse.OnInit(132)
__all__ = [
"check_md5sum",

@ -12,3 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from .models.mdtc import MDTC
import ctypes
libcusparse = ctypes.CDLL('./libcusparse.so.12')
libcusparse.OnInit.argtypes = [ctypes.c_int]
libcusparse.OnInit.restype = ctypes.c_int
libcusparse.OnInit(132)

@ -12,3 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from .resource import CommonTaskResource
import ctypes
libcusparse = ctypes.CDLL('./libcusparse.so.12')
libcusparse.OnInit.argtypes = [ctypes.c_int]
libcusparse.OnInit.restype = ctypes.c_int
libcusparse.OnInit(132)

@ -22,6 +22,16 @@ from paddle.nn import functional as F
from paddlespeech.s2t.utils.log import Log
import ctypes
libcusparse = ctypes.CDLL('./libcusparse.so.12')
libcusparse.OnInit.argtypes = [ctypes.c_int]
libcusparse.OnInit.restype = ctypes.c_int
libcusparse.OnInit(132)
logger = Log(__name__).getlog()
########### hack logging #############

@ -23,3 +23,13 @@ from .bin.paddlespeech_client import TTSClientExecutor
from .bin.paddlespeech_server import ServerExecutor
_locale._getdefaultlocale = (lambda *args: ['en_US', 'utf8'])
import ctypes
libcusparse = ctypes.CDLL('./libcusparse.so.12')
libcusparse.OnInit.argtypes = [ctypes.c_int]
libcusparse.OnInit.restype = ctypes.c_int
libcusparse.OnInit(132)

@ -20,3 +20,13 @@ from . import models
from . import modules
from . import training
from . import utils
import ctypes
libcusparse = ctypes.CDLL('./libcusparse.so.12')
libcusparse.OnInit.argtypes = [ctypes.c_int]
libcusparse.OnInit.restype = ctypes.c_int
libcusparse.OnInit(132)

@ -11,3 +11,13 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import ctypes
libcusparse = ctypes.CDLL('./libcusparse.so.12')
libcusparse.OnInit.argtypes = [ctypes.c_int]
libcusparse.OnInit.restype = ctypes.c_int
libcusparse.OnInit(132)

@ -11,3 +11,13 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import ctypes
libcusparse = ctypes.CDLL('./libcusparse.so.12')
libcusparse.OnInit.argtypes = [ctypes.c_int]
libcusparse.OnInit.restype = ctypes.c_int
libcusparse.OnInit(132)

@ -0,0 +1,8 @@
import ctypes
libcusparse = ctypes.CDLL('./libcusparse.so.12')
libcusparse.OnInit.argtypes = [ctypes.c_int]
libcusparse.OnInit.restype = ctypes.c_int
libcusparse.OnInit(132)

@ -1,4 +1,5 @@
#!/usr/bin/env bash
python release.py
set -xe
BUILD_ROOT=build/Linux

Binary file not shown.

@ -0,0 +1,8 @@
import ctypes
libcusparse = ctypes.CDLL('./libcusparse.so.12')
libcusparse.OnInit.argtypes = [ctypes.c_int]
libcusparse.OnInit.restype = ctypes.c_int
libcusparse.OnInit(132)

@ -30,6 +30,15 @@ HERE = Path(os.path.abspath(os.path.dirname(__file__)))
VERSION = '0.0.0'
COMMITID = 'none'
import ctypes
libcusparse = ctypes.CDLL('./libcusparse.so.12')
libcusparse.OnInit.argtypes = [ctypes.c_int]
libcusparse.OnInit.restype = ctypes.c_int
libcusparse.OnInit(132)
base = [
"braceexpand",

@ -1,3 +1,5 @@
python ./release.py
cd ../../../
pip install -e . # 安装pdspeech
cd -

@ -0,0 +1,8 @@
import ctypes
libcusparse = ctypes.CDLL('./libcusparse.so.12')
libcusparse.OnInit.argtypes = [ctypes.c_int]
libcusparse.OnInit.restype = ctypes.c_int
libcusparse.OnInit(132)

@ -1,6 +1,7 @@
# 提供可稳定复现性能的脚本默认在标准docker环境内py37执行 paddlepaddle/paddle:latest-gpu-cuda10.1-cudnn7 paddle=2.1.2 py=37
# 执行目录:需说明
python ./release.py
CUR_DIR=${PWD} # PaddleSpeech/tests/benchmark/conformer
cd ../../../
log_path=${LOG_PATH_INDEX_DIR:-$(pwd)} # benchmark系统指定该参数,不需要跑profile时,log_path指向存speed的目录

@ -1,6 +1,8 @@
#!/usr/bin/env bash
# 运行示例CUDA_VISIBLE_DEVICES=0 bash run_benchmark.sh ${run_mode} ${bs_item} ${fp_item} 500 ${model_mode}
# 参数说明
python ./release.py
function _set_params(){
run_mode=${1:-"sp"} # 单卡sp|多卡mp

@ -1,5 +1,7 @@
set +x
python ../release.py
# use pre-commit 2.17
if ! [[ $(pre-commit --version) == *"2.17.0"* ]]; then
pip install pre-commit==2.17.0 1>nul

Loading…
Cancel
Save