Skip to content

Commit

Permalink
Run Julia Formatter (#31)
Browse files Browse the repository at this point in the history
* ran formatter

* ci edits
  • Loading branch information
sshin23 authored Sep 7, 2023
1 parent 9f7cf25 commit 575526c
Show file tree
Hide file tree
Showing 39 changed files with 1,078 additions and 1,059 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/formatter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: format-pr
on:
schedule:
- cron: '0 0 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install JuliaFormatter and format
run: |
julia -e 'import Pkg; Pkg.add("JuliaFormatter")'
julia -e 'using JuliaFormatter; format(".")'
# https://github.com/marketplace/actions/create-pull-request
# https://github.com/peter-evans/create-pull-request#reference-example
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Format .jl files
title: 'Automatic JuliaFormatter.jl run'
branch: auto-juliaformatter-pr
delete-branch: true
labels: formatting, automated pr, no changelog
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: build

on: [push, pull_request]
on: [pull_request]

jobs:
test:
Expand Down
4 changes: 2 additions & 2 deletions benchmark/ext/ExaModelsBenchmarkAMDGPU.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ function __init__()
(
name = "AMDGPU",
hardware = "$(AMDGPU.HIP.name(AMDGPU.device()))",
backend = AMDGPU.ROCBackend()
)
backend = AMDGPU.ROCBackend(),
),
)
end

Expand Down
3 changes: 1 addition & 2 deletions benchmark/ext/ExaModelsBenchmarkCUDA.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ import CUDA
function __init__()
push!(
ExaModelsBenchmark.DEVICES,

(
name = "CUDA",
hardware = "$(CUDA.name(CUDA.device()))",
backend = CUDA.CUDABackend()
backend = CUDA.CUDABackend(),
),
)
end
Expand Down
4 changes: 2 additions & 2 deletions benchmark/ext/ExaModelsBenchmarkKernelAbstractions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ function __init__()
(
name = "$(Threads.nthreads())T",
hardware = "$(CpuId.cpubrand())",
backend = KernelAbstractions.CPU()
)
backend = KernelAbstractions.CPU(),
),
)
end

Expand Down
4 changes: 2 additions & 2 deletions benchmark/ext/ExaModelsBenchmarkOneAPI.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ function __init__()
(
name = "oneAPI",
hardware = "$(oneAPI.properties(oneAPI.device()).name)",
backend = oneAPI.oneAPIBackend()
)
backend = oneAPI.oneAPIBackend(),
),
)
end

Expand Down
4 changes: 2 additions & 2 deletions benchmark/src/ExaModelsBenchmark.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ end

export runbenchmark

for name in filter(names(ExaModelsExamples; all=true)) do x
for name in filter(names(ExaModelsExamples; all = true)) do x
endswith(string(x), "model")
end
@eval export $name
end
end

end # module ExaModelsBenchmark
Loading

0 comments on commit 575526c

Please sign in to comment.