CANN: Add x86 build ci (#12950)

* CANN: Add x86 build ci

* CANN: fix code format
This commit is contained in:
hipudding
2025-04-15 19:08:55 +08:00
committed by GitHub
parent 84778e9770
commit 54a7272043
2 changed files with 167 additions and 164 deletions

View File

@ -1767,15 +1767,16 @@ jobs:
defaults: defaults:
run: run:
shell: bash -el {0} shell: bash -el {0}
runs-on: ubuntu-24.04-arm
strategy: strategy:
matrix: matrix:
arch: [x86, aarch64]
cann: cann:
- '8.1.RC1.alpha001-910b-openeuler22.03-py3.10' - '8.1.RC1.alpha001-910b-openeuler22.03-py3.10'
device: device:
- 'ascend910b3' - 'ascend910b3'
build: build:
- 'Release' - 'Release'
runs-on: ${{ matrix.arch == 'aarch64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
container: ascendai/cann:${{ matrix.cann }} container: ascendai/cann:${{ matrix.cann }}
steps: steps:
- name: Checkout - name: Checkout

View File

@ -329,6 +329,7 @@ struct ggml_cann_pool_buf_prio : public ggml_cann_pool {
* @param size Size of the buffer to free. * @param size Size of the buffer to free.
*/ */
void free(void* ptr, size_t size) override { void free(void* ptr, size_t size) override {
GGML_UNUSED(size);
auto it = buffer_pool.find(ptr); auto it = buffer_pool.find(ptr);
if (it == buffer_pool.end()) { if (it == buffer_pool.end()) {
GGML_ABORT("cann pool[%d]: buffer %p not found in pool\n", device, ptr); GGML_ABORT("cann pool[%d]: buffer %p not found in pool\n", device, ptr);
@ -531,6 +532,7 @@ struct ggml_cann_pool_buf : public ggml_cann_pool {
* @param size Size of the buffer to free. * @param size Size of the buffer to free.
*/ */
void free(void* ptr, size_t size) override { void free(void* ptr, size_t size) override {
GGML_UNUSED(size);
for (int i = 0; i < MAX_BUFFERS; ++i) { for (int i = 0; i < MAX_BUFFERS; ++i) {
ggml_cann_buffer& b = buffer_pool[i]; ggml_cann_buffer& b = buffer_pool[i];
if (b.ptr != ptr) { if (b.ptr != ptr) {