Commit f5d79493 authored by flyingdown's avatar flyingdown
Browse files

适配hip

parent d2634d86
......@@ -199,9 +199,9 @@ if(HIP_FOUND)
find_package_and_print_version(rocblas REQUIRED)
find_package_and_print_version(miopen REQUIRED)
find_package_and_print_version(rocfft REQUIRED)
if(ROCM_VERSION_DEV VERSION_GREATER_EQUAL "4.1.0")
#if(ROCM_VERSION_DEV VERSION_GREATER_EQUAL "4.1.0")
find_package_and_print_version(hipfft REQUIRED)
endif()
#endif()
find_package_and_print_version(hipsparse REQUIRED)
find_package_and_print_version(rccl)
find_package_and_print_version(rocprim REQUIRED)
......
......@@ -290,6 +290,12 @@ class SubVector : public VectorBase<Real> {
const MatrixIndexT length)
: VectorBase<Real>(t.tensor_.index({Slice(origin, origin + length)})) {}
SubVector(kaldi::SubVector<Real>&& v): VectorBase<Real>(v.tensor_) {
this->data_ = v.data_;
// v.tensor_ =
v.data_ = NULL;
}
// https://github.com/kaldi-asr/kaldi/blob/7fb716aa0f56480af31514c7e362db5c9f787fd4/src/matrix/kaldi-vector.h#L524-L528
SubVector(const MatrixBase<Real>& matrix, MatrixIndexT row)
: VectorBase<Real>(matrix.tensor_.index({row})) {}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment