Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
0abfffe
PyTorch version upgrade: tested on single-operator tests
wok1909 Sep 24, 2025
b7a275e
[Test] Add torch.no_grad(), change to use torch.nn.ReLU, fuion off
wok1909 Sep 24, 2025
5c5e61c
[Implement] Hook and GuardImpl for extension device
wok1909 Nov 6, 2025
74704b8
[CI] Change the trigger condition
YWHyuk Jan 6, 2026
d3f3298
[CI] Use CMake 3 to build pytorchsim
YWHyuk Jan 6, 2026
0763363
[CI] Seperate base image
YWHyuk Jan 6, 2026
4591403
[Fix] PyTorch2.8 support (WIP)
YWHyuk Jan 7, 2026
b9d4144
[Fix] Use official prologue fusion path
YWHyuk Jan 7, 2026
9abc060
[Fix] Don't split a reduce kernel
YWHyuk Jan 7, 2026
2c7264b
[Fix] Add a missing reduction fusion condition
YWHyuk Jan 7, 2026
b951b95
[Fix] update indirect_index interface for v2.8
YWHyuk Jan 7, 2026
c6ba98c
[Fix] Allow cpp kernel code in the wrapper function
YWHyuk Jan 7, 2026
fd07eda
[Ops] Use V.kernel instead of argument passing
YWHyuk Jan 8, 2026
4bed31b
[Fix] Set epilogue fusoin condition
YWHyuk Jan 8, 2026
758b5b3
[Fix] Support Identity indexing + Fix wrapper codegen
YWHyuk Jan 8, 2026
a7ab604
[Fix] Keep contextvar after reset()
YWHyuk Jan 8, 2026
cd52f57
[Frontend] Add decompsition of default attetnion
YWHyuk Jan 8, 2026
08e0c8b
[Fix] Add missing case
YWHyuk Jan 8, 2026
1d1508a
[Test] Add GQA test file
YWHyuk Jan 8, 2026
862ba44
[Fix+Log] Change logging system + Fix meta_code interface
YWHyuk Jan 9, 2026
75207a4
[Test] Wrap softmax module
YWHyuk Jan 9, 2026
8df5fef
[Log] Add progress bar for auto-tuning
YWHyuk Jan 9, 2026
d7c16b1
[Test/MoE] Disable compiling sparse dispatcher
YWHyuk Jan 9, 2026
c88cabc
[Fix] Support identity in the dram_stride extraction
YWHyuk Jan 12, 2026
67612bb
[Fix] index to float casting
YWHyuk Jan 12, 2026
50ceb58
[Fix] Change vlane_split_axis in case of group-dim
YWHyuk Jan 12, 2026
319fd6c
[Frontend] Fix any operation codegen
YWHyuk Jan 13, 2026
c223258
[Decompose] Use F.softmax for decomposed SDPA
YWHyuk Jan 13, 2026
07be94b
[Frontend] Add recompiliation for ModularIndexing
YWHyuk Jan 13, 2026
e999bfc
[Test] Fix minor bugs in the test folder
YWHyuk Jan 13, 2026
d747e7e
[Log] Add progress bar in spike simulation
YWHyuk Jan 13, 2026
b49b679
[Fix] Use extraction for vlane_offset + Register extract op
YWHyuk Jan 15, 2026
729b999
[Tests/Diffusion] Add embedding test case
YWHyuk Jan 15, 2026
7fa8d54
[Tests/MoE] Add patch to avoid dynamo bug
YWHyuk Jan 15, 2026
7919094
[Fix] Change wrong TORCHSIM_DUMP_PATH usage
YWHyuk Jan 15, 2026
1ca3348
[Scheduler] Validate pytorchsim_timing_mode != 0 in Scheduler constru…
YWHyuk Jan 15, 2026
8df3bee
[Fix] Move rename_indexing before load cacheing
YWHyuk Jan 15, 2026
ea79ad0
[Fusion] Fix template codegen + Add custom fusion hook
YWHyuk Jan 16, 2026
0c6175f
[Template] Fix template fusion codegen
YWHyuk Jan 19, 2026
a90f114
[Fix] Fusion axis mechanism change
YWHyuk Jan 20, 2026
78613ad
[Test] Fix syntax error in experiment scripts
YWHyuk Jan 22, 2026
21d08f2
[CI] Change base image for OpenReg build
YWHyuk Jan 22, 2026
24e67ed
[OpenReg] Use OpenReg style Custom device
YWHyuk Jan 22, 2026
468f414
[Device] Use torch.device(npu)
YWHyuk Jan 22, 2026
a625409
[SDPA] Use math as a default
YWHyuk Jan 23, 2026
a053314
[AMP] Add amp interface for OpenReg style device
YWHyuk Jan 23, 2026
eda34ff
[Tests] Cleanup unnecessary code in tests
YWHyuk Jan 23, 2026
3f8b866
[Cleanup] Remove built libraries
YWHyuk Jan 23, 2026
174e10f
[Device] Rename deivce PyTorchSimDevice2 to PyTorchSimDevice
YWHyuk Jan 23, 2026
89546d7
[Test] Add YOLOv5 test file
Jagggged Jan 24, 2026
70f0f6c
Merge pull request #208 from Jagggged/fix/add_yolov5_2.8_ljg
YWHyuk Jan 27, 2026
d5be66e
[Cleanup] Fix indent error
YWHyuk Jan 27, 2026
5ec144d
[Test #204] Add yolov5 test ci
YWHyuk Jan 27, 2026
730fce9
[Fix] Remove comments
YWHyuk Jan 27, 2026
47c563e
[Frontend] Fix Identity handling for index expr
YWHyuk Feb 2, 2026
d3cf863
[OpenReg] Add Python interface for device stream, event API
YWHyuk Feb 3, 2026
5224cc9
[Scheduler] Reimplement Scheduling mechanism
YWHyuk Feb 3, 2026
09753bc
[TOGSim] Rename scheduler_graph to enqueue_graph
YWHyuk Feb 5, 2026
235bb5c
[TOGSim] Add comments feature in trace files
YWHyuk Feb 5, 2026
9dbe037
[Eager] Add eager mode POC
YWHyuk Feb 5, 2026
f9a9f5f
[Eager] Add eager to graph fallback API
YWHyuk Feb 6, 2026
a13f37b
[Template] Conv warpper minor fix
YWHyuk Feb 6, 2026
e840786
[Fix] Index_expr ops codegen issue
YWHyuk Feb 11, 2026
f60cbe5
[Codegen] Use ops instead of raw assembly
YWHyuk Feb 23, 2026
014cb11
[Test] Add DeepSeek v3 base test file and etc. (WIP)
Jagggged Feb 19, 2026
9a27549
[Fix] Polish the error handling of dram_stride calculation
YWHyuk Feb 25, 2026
88e79e0
[CI] Update for torch 2.8 based image
YWHyuk Mar 3, 2026
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
4 changes: 2 additions & 2 deletions .github/workflows/docker-base-image-2-8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Docker Base Image CI (PyTorch 2.8)

on:
push:
branches: [ "base" ]
branches: [ "base_v2.8" ]
workflow_dispatch:
repository_dispatch:
types: [ build_base ]
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
file: ./Dockerfile.base
push: true
build-args: |
PYTORCH_IMAGE=pytorch/pytorch:2.8.0-cuda12.6-cudnn9-runtime
PYTORCH_IMAGE=pytorch/pytorch:2.8.0-cuda12.6-cudnn9-devel
GEM5_ASSET_ID=${{ env.GEM5_ASSET_ID }}
LLVM_ASSET_ID=${{ env.LLVM_ASSET_ID }}
SPIKE_ASSET_ID=${{ env.SPIKE_ASSET_ID }}
Expand Down
72 changes: 0 additions & 72 deletions .github/workflows/docker-base-image.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/docker-image-2-8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Docker image CI (PyTorch 2.8)

on:
pull_request:
branches: [ "torch_v2.8" ]
branches: [ "master", "develop" ]
workflow_dispatch:

jobs:
Expand Down
70 changes: 0 additions & 70 deletions .github/workflows/docker-image.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/pytorchsim_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,27 @@ jobs:
-e vpu_spad_size_kb_per_lane="${{ inputs.spad_size }}" \
${{ inputs.image_name }} python3 PyTorchSim/tests/Llama/test_llama.py

test_yolov5:
name: Run test_yolov5
runs-on: self-hosted
steps:
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Run test_yolov5.py
run: |
echo "Running test_yolov5.py"
docker run --rm \
-v /tmp/torchsim-ci/${GITHUB_SHA}:/dump \
-e TORCHSIM_DUMP_PATH=/dump \
-e vpu_num_lanes="${{ inputs.vector_lane }}" \
-e vpu_spad_size_kb_per_lane="${{ inputs.spad_size }}" \
${{ inputs.image_name }} python3 PyTorchSim/tests/Yolov5/test_yolov5.py

test_accuracy:
name: Run test_accuracy
runs-on: self-hosted
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
__pycache__/
TOGSim/build/
.vscode
*.txt
*.ipynb_checkpoints
output
togsim_results/*
Expand Down
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@ RUN cd PyTorchSim/TOGSim && \
cd build && \
conan install .. --build=missing && \
cmake .. && \
make -j$(nproc)
make -j$(nproc)

RUN cd PyTorchSim/PyTorchSimDevice && \
python -m pip install --no-build-isolation -e .
10 changes: 9 additions & 1 deletion Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ RUN apt -y update && \
python3-dev python-is-python3 libboost-all-dev \
libhdf5-serial-dev python3-pydot libpng-dev libelf-dev pkg-config pip \
python3-venv black libssl-dev libasan5 libubsan1 curl device-tree-compiler wget ninja-build && \
pip install onnx matplotlib scikit-learn pydot tabulate && pip install --user conan==1.56.0 && rm -rf /var/lib/apt/lists/*
pip install onnx matplotlib scikit-learn pydot tabulate && pip install --user conan==1.56.0 cmake==3.26.4 && rm -rf /var/lib/apt/lists/*

# Download RISC-V tool chain
RUN wget https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2023.12.14/riscv64-glibc-ubuntu-22.04-llvm-nightly-2023.12.14-nightly.tar.gz && \
Expand All @@ -45,6 +45,14 @@ RUN wget https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2
# Install torchsim dependency
RUN apt install ninja-build && pip install onnx matplotlib && pip install --user conan==1.56.0 && pip install "transformers<4.44" && pip install diffusers==0.34.0

# FlashAttention
RUN python -m pip install --no-build-isolation flash-attn

# Extra Python deps for YOLO/vision tests
RUN python -m pip install -U pip setuptools wheel && \
python -m pip install --no-cache-dir --no-deps ultralytics && \
python -m pip install --no-cache-dir opencv-python-headless pandas seaborn

ENV RISCV=/workspace/riscv
ENV PATH=$RISCV/bin:$PATH

Expand Down
44 changes: 44 additions & 0 deletions PyTorchSimDevice/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
cmake_minimum_required(VERSION 3.18 FATAL_ERROR)

project(TORCH_OPENREG CXX C)

include(GNUInstallDirs)
include(CheckCXXCompilerFlag)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_EXTENSIONS OFF)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_SKIP_BUILD_RPATH FALSE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)

set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)

if(APPLE)
set(CMAKE_INSTALL_RPATH "@loader_path/lib;@loader_path")
elseif(UNIX)
set(CMAKE_INSTALL_RPATH "$ORIGIN/lib:$ORIGIN")
elseif(WIN32)
set(CMAKE_INSTALL_RPATH "")
endif()
set(CMAKE_INSTALL_LIBDIR lib)
set(CMAKE_INSTALL_MESSAGE NEVER)

set(Torch_DIR ${PYTORCH_INSTALL_DIR}/share/cmake/Torch)
find_package(Torch REQUIRED)

if(DEFINED PYTHON_INCLUDE_DIR)
include_directories(${PYTHON_INCLUDE_DIR})
else()
message(FATAL_ERROR "Cannot find Python directory")
endif()

include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include(${PROJECT_SOURCE_DIR}/cmake/TorchPythonTargets.cmake)

add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/openreg)
add_subdirectory(${PROJECT_SOURCE_DIR}/csrc)
add_subdirectory(${PROJECT_SOURCE_DIR}/torch_openreg/csrc)
Loading