Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
suryajasper committed Jul 18, 2024
1 parent 82d4736 commit 6e31cd7
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 14 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/run_bench.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Build and Test

on:
push:
on:
pull_request:
schedule:
- cron: '0 7 * * *'
- cron: '0 8 * * *'

jobs:
build:
Expand Down Expand Up @@ -58,9 +57,10 @@ jobs:
- name: Run RocBLAS Benchmarks
run: |
sudo pkill -f gemm-bench
cd $GITHUB_WORKSPACE
source $GITHUB_WORKSPACE/venv/bin/activate
sudo $GITHUB_WORKSPACE/build/gemm-bench --device=0 &
for device in $(seq 3 7); do (sudo $GITHUB_WORKSPACE/build/gemm-bench --device=$device &); done
./gb run --backends=rocblas --output=rocblas.hdf
sudo pkill -f gemm-bench
deactivate
Expand All @@ -69,7 +69,7 @@ jobs:
run: |
cd $GITHUB_WORKSPACE
source $GITHUB_WORKSPACE/venv/bin/activate
sudo $GITHUB_WORKSPACE/build/gemm-bench --device=0 &
for device in $(seq 3 7); do (sudo $GITHUB_WORKSPACE/build/gemm-bench --device=$device &); done
./gb run --backends=iree --output=iree.hdf
sudo pkill -f gemm-bench
deactivate
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
build
rocm_gemm_venv
*.venv
__pycache__
*.hdf
1 change: 1 addition & 0 deletions src/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ireekernelsbuild
16 changes: 8 additions & 8 deletions src/benchmark/gemm-bench.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ namespace GEMMBench
class GEMMPipeline
{
public:
void initialize() {};
void destroy() {};
void linkData(GEMMData* data)
virtual void initialize() {};
virtual void destroy() {};
virtual void linkData(GEMMData* data)
{
this->data = data;
};
void setDevice(int device_id) {};
virtual void setDevice(int device_id) {};
virtual Result run(Problem problem) = 0;

protected:
Expand All @@ -104,17 +104,17 @@ namespace GEMMBench

public:
IREEGEMMBench(){};
void initialize();
void setDevice(int device_id);
void destroy();
void initialize() override;
void setDevice(int device_id) override;
void destroy() override;
Result run(Problem problem) override;
};

class RocBLASGEMMBench : public GEMMPipeline
{
public:
RocBLASGEMMBench(){};
void setDevice(int device_id);
void setDevice(int device_id) override;
Result run(Problem problem) override;
};

Expand Down
1 change: 0 additions & 1 deletion src/benchmark/run_iree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ std::string

void IREEGEMMBench::initialize()
{
std::cout << "Initializing bench" << std::endl;
char** compileArgs = new char*[2];
compileArgs[0] = (char*)"--iree-hal-target-backends=rocm";
compileArgs[1] = (char*)"--iree-rocm-target-chip=gfx942";
Expand Down

0 comments on commit 6e31cd7

Please sign in to comment.