Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:

- name: Upload artifacts
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: |
rwkv-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-${{ steps.system-info.outputs.OS_TYPE }}-${{ steps.system-info.outputs.OS_NAME }}-${{ steps.system-info.outputs.OS_VERSION }}-${{ steps.system-info.outputs.CPU_ARCH }}.zip
Expand Down Expand Up @@ -165,7 +165,7 @@ jobs:

- name: Upload artifacts
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: |
rwkv-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-${{ steps.system-info.outputs.OS_TYPE }}-${{ steps.system-info.outputs.OS_NAME }}-${{ steps.system-info.outputs.OS_VERSION }}-${{ steps.system-info.outputs.CPU_ARCH }}.zip
Expand Down Expand Up @@ -296,7 +296,7 @@ jobs:

- name: Upload artifacts
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: |
rwkv-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-win-${{ matrix.build }}-x64.zip
Expand All @@ -317,7 +317,7 @@ jobs:
steps:
- name: Download artifacts
id: download-artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4

- name: Get commit hash
id: commit
Expand Down
8 changes: 4 additions & 4 deletions rwkv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ struct rwkv_context * rwkv_init_from_file(const char * file_path, const uint32_t
ctx->n_threads = n_threads;

if (n_gpu_layers) {
ggml_backend_t backend;
ggml_backend_t backend = nullptr;

#ifdef GGML_USE_CUDA
backend = ggml_backend_cuda_init(0);
Expand All @@ -97,9 +97,9 @@ struct rwkv_context * rwkv_init_from_file(const char * file_path, const uint32_t
RWKV_ENSURE_OR_NULL(backend);
ggml_backend_blas_set_n_threads(backend, ctx->n_threads);
#endif
RWKV_ENSURE_OR_NULL(backend);

ctx->model->backends.push_back(backend);
if (backend != nullptr) {
ctx->model->backends.push_back(backend);
}
}

ggml_backend_t cpu_backend = ggml_backend_cpu_init();
Expand Down
Loading