-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
general offload: Add a generic host offload application and add first…
… snDNN gemm kernel setup
- Loading branch information
Showing
25 changed files
with
2,753 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Copyright 2023 ETH Zurich and University of Bologna. | ||
# Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Luca Colagrande <colluca@iis.ee.ethz.ch> | ||
|
||
SUBDIRS = offload | ||
# SUBDIRS += gemm | ||
SUBDIRS += axpy | ||
# SUBDIRS += nop | ||
# SUBDIRS += blas/axpy | ||
# SUBDIRS += blas/gemm | ||
# SUBDIRS += sndnn/batchnorm | ||
# # SUBDIRS += sndnn/conv2d # fails with exit code 32 | ||
# SUBDIRS += sndnn/fusedconv | ||
# SUBDIRS += sndnn/gelu | ||
SUBDIRS += sndnn/gemm | ||
# # SUBDIRS += sndnn/layernorm # throws illegal instruction in simulation | ||
# SUBDIRS += sndnn/linear | ||
# SUBDIRS += sndnn/maxpool | ||
# # SUBDIRS += sndnn/softmax | ||
|
||
.PHONY: all clean $(SUBDIRS) | ||
|
||
all: $(SUBDIRS) | ||
|
||
$(SUBDIRS): | ||
$(MAKE) -C $@ $(TARGET) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Copyright 2023 ETH Zurich and University of Bologna. | ||
# Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Gianna Paulin <pauling@iis.ee.ethz.ch> | ||
|
||
# Usage of absolute paths is required to externally include this Makefile | ||
MK_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST)))) | ||
DATA_DIR := $(realpath $(MK_DIR)/data) | ||
SRC_DIR := $(realpath $(MK_DIR)/$(APP_NAME)/src) | ||
SNDNN_DIR := $(shell bender path snitch_cluster)/sw/snDNN/) | ||
SNDNN_LIB_DIR := $(realpath $(MK_DIR)/../../libraries/snDNN/) | ||
# SNDNN_SRC_DIR := $(shell bender path snitch_cluster)/sw/snDNN/src) | ||
|
||
INCLUDE_DIR = $(realpath $(SNDNN_DIR)/include) | ||
INCLUDE_DIR += $(realpath $(SNDNN_DIR)/src) | ||
INCLUDE_DIR += $(realpath $(SNDNN_LIB_DIR)/src) | ||
|
||
DATA_CFG ?= $(DATA_DIR)/$(APP_NAME)_params.hjson | ||
|
||
APP ?= $(APP_NAME) | ||
SRCS += $(realpath $(SRC_DIR)/net_$(APP_NAME).c) | ||
# SRCS += $(realpath $(SNDNN_LIB_DIR)/src/sndnn.c) | ||
INCDIRS += $(DATA_DIR) $(SRC_DIR) $(INCLUDE_DIR) | ||
|
||
$(DATA_DIR)/data_$(APP_NAME).h: $(MK_DIR)/datagen.py $(DATA_CFG) | ||
$< -c $(DATA_CFG) > $@ | ||
|
||
.PHONY: clean-data clean | ||
|
||
clean-data: | ||
rm -f $(DATA_DIR)/data_$(APP_NAME).h | ||
|
||
clean: clean-data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright 2020 ETH Zurich and University of Bologna. | ||
// Solderpad Hardware License, Version 0.51, see LICENSE for details. | ||
// SPDX-License-Identifier: SHL-0.51 | ||
|
||
// Parameters for a GEMM | ||
|
||
{ | ||
kernel: "GEMM" | ||
M: 16, | ||
N: 16, | ||
K: 16, | ||
alpha: 0, | ||
transpose_A: false, | ||
transpose_B: true, | ||
prec: 32, | ||
expand: 0 | ||
} |
Oops, something went wrong.