Skip to content

为什么使用GPU比CPU要慢呢? #72

@geekgogo

Description

@geekgogo

使用的示例进行测试:

from reazonspeech.k2.asr import load_model, transcribe, audio_from_path
import time


audio = audio_from_path("ja_test.wav")
model = load_model("cuda", "int8", "ja")
start_time = time.monotonic()
ret = transcribe(model, audio)
print(ret.text)
print(f"Decoding took {time.monotonic() - start_time:.2f} seconds")```


在4090和5090上都试过,结果是一样的。1个6s的音频文件,CPU耗时0.23s, GPU耗时0.66s

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions