diff --git a/.github/workflows/short-tests.yml b/.github/workflows/short-tests.yml index f721f32a3..51e7c6cf8 100644 --- a/.github/workflows/short-tests.yml +++ b/.github/workflows/short-tests.yml @@ -40,7 +40,7 @@ jobs: - uses: actions/checkout@v4 - name: Run Simulation run: echo "skipped SASS-Simulation. Will perform in merge queue" - SASS-Simulation: + mail-test: runs-on: tgrogers-raid defaults: run: diff --git a/runner.py b/runner.py new file mode 100644 index 000000000..c3db24329 --- /dev/null +++ b/runner.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +from jwt import JWT, jwk_from_pem +import time +import requests + +pem = "aalp-self-hosted-runner.2024-06-21.private-key.pem" +client_id = "Iv23lixzRYO8eKFZQCxt" +installation_id = "52081584" # Replace with your actual installation ID + +# Open PEM +with open(pem, 'rb') as pem_file: + signing_key = jwk_from_pem(pem_file.read()) + +payload = { + # Issued at time + 'iat': int(time.time()), + # JWT expiration time (in sec, 10 minutes maximum) + 'exp': int(time.time()) + 60, + # GitHub App's client ID + 'iss': client_id +} + +# Create JWT +jwt_instance = JWT() +jwt = jwt_instance.encode(payload, signing_key, alg='RS256') + +# Set the URL for the request +url = f"https://api.github.com/app/installations/{installation_id}/access_tokens" + +# Set the headers +headers = { + "Accept": "application/vnd.github+json", + "Authorization": f"Bearer {jwt}", + "X-GitHub-Api-Version": "2022-11-28" +} + +# Send the POST request +response = requests.post(url, headers=headers) + +# Get the "token" field from the response +token = response.json().get("token") + +# get token for creating the runners +org = "accel-sim" # Replace with your organization name + +# Set the URL for the request +url = f"https://api.github.com/orgs/{org}/actions/runners/registration-token" + +# Set the headers +headers = { + "Accept": "application/vnd.github+json", + "Authorization": f"Bearer {token}", + "X-GitHub-Api-Version": "2022-11-28" +} + +# Send the POST request +response = requests.post(url, headers=headers) + +token = response.json().get("token") +print(token) \ No newline at end of file diff --git a/test b/test new file mode 100755 index 000000000..bd40ff1a3 Binary files /dev/null and b/test differ diff --git a/test.cu b/test.cu new file mode 100644 index 000000000..60c061b16 --- /dev/null +++ b/test.cu @@ -0,0 +1,52 @@ +#include +#include + +__global__ void testDependency(int *start, int *results, int n) +{ + int index = threadIdx.x + blockIdx.x * blockDim.x; + + int dependency_var = 0; + + // # pragma unroll + for (int i = index; i < n; ++i) + { + // if (start[i] < n && i == start[i]) + // { + dependency_var = start[i]; + // } + } + results[index] = dependency_var; +} + +int main() +{ + unsigned n = 1024*1024; + int results[n]; + + int *d_results; + cudaMalloc(&d_results, n * sizeof(int)); + + int *start, *d_start; + cudaMalloc(&d_start, n * sizeof(int)); + cudaMallocHost(&start, n * sizeof(int)); + + for (int i = 0; i < n; ++i) + { + start[i] = i; + } + + cudaMemcpy(d_start, start, n * sizeof(unsigned), cudaMemcpyHostToDevice); + + testDependency<<<1, 1>>>(d_start, d_results, n); + + cudaMemcpy(results, d_results, n * sizeof(int), cudaMemcpyDeviceToHost); + + cudaFree(d_results); + + for (int i = 0; i < n / 1024; ++i) + { + std::cout << "Result[" << i << "]: " << results[i] << std::endl; + } + + return 0; +}