Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
13f474f
Delete python/axono/data directory
aztice Dec 13, 2025
54f9c57
Delete python/axono/models directory
aztice Dec 13, 2025
201e8d2
Delete python/axono/train directory
aztice Dec 13, 2025
9681495
Delete python/axono/viz directory
aztice Dec 13, 2025
bff50f4
Delete python/axono/nn/layers.py
aztice Dec 13, 2025
681d224
Update module.py
aztice Dec 13, 2025
f77b248
Create layers.py
aztice Dec 13, 2025
772d434
Create __init__.py
aztice Dec 13, 2025
388cd53
Update pyproject.toml
aztice Dec 13, 2025
427582f
Create test_module.py
aztice Dec 13, 2025
062bb9a
Create module.h
aztice Dec 13, 2025
0658737
Update tensor.cpp
aztice Dec 13, 2025
1a16bba
Create module.h
aztice Dec 13, 2025
e75e89d
Rename src/core/module.h to include/axono/core/module.h
aztice Dec 13, 2025
2fdc028
Update autopackage_linux_x86_64_cpu.yml
aztice Dec 13, 2025
1fa2636
Update autopackage_linux_x86_64_cuda.yml
aztice Dec 13, 2025
8b37f3e
Update CMakeLists.txt
aztice Dec 13, 2025
8efc286
Update pybind11_module.cpp
aztice Dec 13, 2025
178a5d4
Update add.py
aztice Dec 13, 2025
d67958c
Update matmul.py
aztice Dec 13, 2025
33b0f78
Update relu.py
aztice Dec 13, 2025
48744d6
Update __init__.py
aztice Dec 13, 2025
f2c143f
Update pyproject.toml
aztice Dec 13, 2025
ffce536
Update __init__.py
aztice Dec 13, 2025
1fe300a
Update tensor.py
aztice Dec 13, 2025
ca0f202
Update pybind11_module.cpp
aztice Dec 13, 2025
13a1379
Update pybind11_module.cpp
aztice Dec 13, 2025
95cedeb
Update module.h
aztice Dec 13, 2025
bbe4581
Update layers.py
aztice Dec 13, 2025
af7ae2a
Update test_module.py
aztice Dec 13, 2025
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
11 changes: 2 additions & 9 deletions .github/workflows/autopackage_linux_x86_64_cpu.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
name: Publish Axono Package (Linux x86_64 For CPU)

# on:
# push:
# tags:
# - 'v*'

on:
push:
branches: [ dev ]
pull_request:
branches: [ dev ]
workflow_dispatch: # 添加手动触发器
tags:
- 'v*'

jobs:
build:
Expand Down
13 changes: 3 additions & 10 deletions .github/workflows/autopackage_linux_x86_64_cuda.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
name: Publish Axono Package (Linux x86_64 For CUDA)

# on:
# push:
# tags:
# - 'v*'

on:
push:
branches: [ dev ]
pull_request:
branches: [ dev ]
workflow_dispatch: # 添加手动触发器
push:
tags:
- 'v*'

jobs:
build:
Expand Down
16 changes: 16 additions & 0 deletions include/axono/core/module.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include "tensor.h"

namespace axono::core {
class Module {
private:
std::unordered_map<std::string, Tensor> weights_; // 存储权重张量
public:
void add_weight(const std::string& name, const Tensor& weight) {
weights_[name] = weight;
}
Tensor& get_weight(const std::string& name) {
return weights_.at(name);
}
auto& weights() { return weights_; }
};
}
23 changes: 23 additions & 0 deletions include/axono/pybind/core/module.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include "axono/core/module.h"

namespace py = pybind11;

void init_module(py::module &m) {
py::class_<axono::core::Module>(m, "Module")
.def(py::init<>(), "创建一个空的 Module 实例")
.def("add_weight",
&axono::core::Module::add_weight,
py::arg("name"), py::arg("weight"),
"向模块添加权重张量")
.def("get_weight",
&axono::core::Module::get_weight,
py::arg("name"),
py::return_value_policy::reference_internal,
"获取指定名称的权重张量")
.def("weights",
&axono::core::Module::weights,
py::return_value_policy::reference_internal,
"返回模块中所有权重的映射");
}
6 changes: 1 addition & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "axono"
version = "0.1.0"
version = "0.2.0"
description = "Deep learning framework with tensor operations and neural network modules"
readme = "README.md"
requires-python = ">=3.8"
Expand Down Expand Up @@ -39,11 +39,7 @@ package-dir = { "" = "python" }
packages = [
"axono",
"axono.core",
"axono.data",
"axono.models",
"axono.nn",
"axono.train",
"axono.viz",
"axono.core.operators",
"axono.core.ops"
]
Expand Down
12 changes: 6 additions & 6 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,26 @@ endif()

list(FILTER CORE_SOURCES EXCLUDE REGEX "\\.ipynb_checkpoints/")

pybind11_add_module(axonolib
pybind11_add_module(libaxono
src/pybind11_module.cpp
${CORE_SOURCES}
)

if(WITH_CUDA)
target_compile_definitions(axonolib PRIVATE COMPILED_WITH_CUDA)
target_compile_definitions(libaxono PRIVATE COMPILED_WITH_CUDA)
endif()

target_include_directories(axonolib PRIVATE
target_include_directories(libaxono PRIVATE
${CMAKE_SOURCE_DIR}/include
)

target_include_directories(axonolib PRIVATE
target_include_directories(libaxono PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/include
)

# Set output properties
set_target_properties(axonolib PROPERTIES
OUTPUT_NAME "axonolib"
set_target_properties(libaxono PROPERTIES
OUTPUT_NAME "libaxono"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/python/axono/library"
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/python/axono/library"
PREFIX ""
Expand Down
2 changes: 1 addition & 1 deletion python/axono/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

from .core import DataType, Status, Tensor, operators

__version__ = "0.1.0"
__version__ = "0.2.0"
__author__ = "ByteRainLab"
__description__ = "High performance computing library for big data processing"

Expand Down
2 changes: 1 addition & 1 deletion python/axono/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
library_path = os.path.dirname(os.path.dirname(__file__)) + "/library/"
sys.path.append(library_path)

from axonolib import DataType, Status # noqa: E402
from libaxono import DataType, Status # noqa: E402

from . import operators # noqa: E402
from .tensor import Tensor # noqa: E402
Expand Down
2 changes: 1 addition & 1 deletion python/axono/core/operators/add.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
Axono Add
"""

from axonolib import add as _add
from libaxono import add as _add

from ..tensor import Tensor

Expand Down
2 changes: 1 addition & 1 deletion python/axono/core/operators/matmul.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
Axono Matmul
"""

from axonolib import matmul as _matmul
from libaxono import matmul as _matmul

from ..tensor import Tensor

Expand Down
4 changes: 2 additions & 2 deletions python/axono/core/ops/relu.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
core.ops.Relu()
"""

from axonolib import relu as relu_op
from axonolib import relu_ as relu_op_
from libaxono import relu as relu_op
from libaxono import relu_ as relu_op_

from ..tensor import Tensor

Expand Down
4 changes: 2 additions & 2 deletions python/axono/core/tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import os

import numpy as np
from axonolib import DataType, Status
from axonolib import Tensor as _Tensor
from libaxono import DataType, Status
from libaxono import Tensor as _Tensor

default_device = os.getenv("axono_default_device", "cpu")

Expand Down
151 changes: 0 additions & 151 deletions python/axono/data/dataloader.py

This file was deleted.

Loading