Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix new arch context build check #441

Merged
merged 1 commit into from
Jan 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion lightseq/csrc/ops_new/linear.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ void LinearOp<T1, T2>::forward() {
T1* input_ptr = (T1*)parent(0)->value();
T1* weights = (T1*)parent(1)->value();
T1* out_ptr = (T1*)child(0)->value();
cublasHandle_t _cublasHandle = _context_ptr->get_cublashandle();

if (!_context_ptr->is_built()) {
return;
}

cublasHandle_t _cublasHandle = _context_ptr->get_cublashandle();

cublas_gemm_ex(_cublasHandle, _opA, _opB, _output_size, _batch_tokens,
_input_size, &_alpha, &beta, weights, input_ptr, out_ptr,
cublasGemmAlgo_t(_gemm_algos[0]));
Expand Down