Browse Source
* bump the required cmake version to 3.21.3 * Fix device_globals example name * Fix hip_streams timeout on AMD windows debug build type * Update templates * Update cuda container to ROCm 5.4 * Change std::bind into lambda * HIP 5.5 fixes * fix tests not being executed * Make the reference to the identity and transpose op uniform * Fix NVCC CI * Resolve "Increase timeout for CI" * Update fixed size arrays to C++ standards * Add missing include in hip_texture_management * Remove void** cast from hipMalloc * Fix hip-libraries-cuda-ubuntu Dockerfile * Make the windows builds less verbose * Rework Windows CI * Skip failing rocsparse tests * Fix cooperative groups example * ci: Make skipped examples more prominent in windows VS test runner * Enable rocsparse examples in CI * Update .gitlab/issue_templates/example.md Fix small typo --------- Co-authored-by: Balint Soproni <balint@streamhpc.com> Co-authored-by: Robin Voetter <robin@streamhpc.com> Co-authored-by: Nara Prasetya <nara@streamhpc.com> Co-authored-by: Nol Moonen <nol@streamhpc.com> Co-authored-by: Mátyás Aradi <matyas@streamhpc.com> Co-authored-by: Gergely Mészáros <gergely@streamhpc.com> Co-authored-by: Sam Wu <22262939+samjwu@users.noreply.github.com>pull/113/head
30 changed files with 463 additions and 325 deletions
@ -1,22 +1,12 @@
@@ -1,22 +1,12 @@
|
||||
# Example checklist |
||||
|
||||
- Elaboration |
||||
- [ ] Example concept is described and agreed on |
||||
- [ ] Example concept is described and agreed upon |
||||
- Implementation |
||||
- [ ] Example is implemented |
||||
- CMake support is added |
||||
- [ ] Linux |
||||
- [ ] Windows |
||||
- [ ] GNU Make support is added (Linux) |
||||
- [ ] Visual Studio project is added (Windows) |
||||
- [ ] Project is added to the root solution |
||||
- [ ] Inline code documentation is added |
||||
- [ ] README is added according to template |
||||
- [ ] Related READMEs, ToC are updated |
||||
- [ ] Internal CI passes |
||||
- [ ] Example is implemented |
||||
- Internal review |
||||
- [ ] Internal code review is done |
||||
- [ ] Internal code review is done |
||||
- External review |
||||
- [ ] Upstreaming PR is opened, external code review is done |
||||
- [ ] Upstreaming PR is opened, external review is done |
||||
- Done |
||||
- [ ] Example merged to upstream |
||||
- [ ] Example merged to upstream |
||||
|
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
## Notes for the reviewer |
||||
_The reviewer should acknowledge all these topics._ |
||||
<insert notes> |
||||
|
||||
## Checklist before merge |
||||
- [ ] CMake support is added |
||||
- [ ] Dependencies are copied via `IMPORTED_RUNTIME_ARTIFACTS` if applicable |
||||
- [ ] GNU Make support is added (Linux) |
||||
- [ ] Visual Studio project is added for VS2017, 2019, 2022 (Windows) (use [the script](https://projects.streamhpc.com/departments/knowledge/employee-handbook/-/wikis/Projects/AMD/Libraries/examples/Adding-Visual-Studio-Projects-to-new-examples#scripts)) |
||||
- [ ] DLL dependencies are copied via `<Content Include` |
||||
- [ ] Visual Studio project is added to `ROCm-Examples-vs*.sln` (ROCm) |
||||
- [ ] Visual Studio project is added to `ROCm-Examples-Portable-vs*.sln` (ROCm/CUDA) if applicable |
||||
- [ ] Inline code documentation is added |
||||
- [ ] README is added according to template |
||||
- [ ] Related READMEs, ToC are updated |
||||
- [ ] The CI passes for Linux/ROCm, Linux/CUDA, Windows/ROCm, Windows/CUDA. |
@ -0,0 +1,108 @@
@@ -0,0 +1,108 @@
|
||||
param( |
||||
[Parameter(Mandatory)] |
||||
[string]$Path = "Debug", |
||||
[string]$Filter = "*.exe", |
||||
[int]$Timeout = 10, |
||||
[string[]]$Skip = @() |
||||
) |
||||
$Skip = $Skip | ForEach-Object { $_.Trim() } |
||||
|
||||
Write-Host "Testing all '$Filter' in '$Path' with a timeout of $Timeout" |
||||
Write-Host "Skipping examples that match any of:" |
||||
foreach($item in $Skip) { |
||||
Write-Host "- $item" |
||||
} |
||||
|
||||
$FailureCount = 0 |
||||
$Results = @() |
||||
|
||||
function Run-Example { |
||||
param( |
||||
[System.IO.FileInfo]$FileInfo |
||||
) |
||||
|
||||
$Job = Start-Job -ScriptBlock { |
||||
param([string]$FullName) |
||||
$Time = Measure-Command { |
||||
try { |
||||
$Log = & $FullName |
||||
$JobExitStatus = $LASTEXITCODE |
||||
} catch { |
||||
$JobExitStatus = "CRASH!" |
||||
} |
||||
} |
||||
return [PSCustomObject]@{ |
||||
ExitStatus = $JobExitStatus |
||||
Log = $Log |
||||
Time = $Time |
||||
} |
||||
} -ArgumentList $FileInfo.FullName |
||||
|
||||
# Execute the job with a timeout |
||||
$Job | Wait-Job -TimeOut $Timeout | Out-Null |
||||
|
||||
# Get the results from the job! |
||||
$Result = Receive-Job $Job |
||||
Write-Host $Result.Log |
||||
|
||||
if ($null -ne $Result.ExitStatus) { |
||||
$TimeSpan = $Result.Time.toString("mm\:ss\.fff") |
||||
$ExitStatus = $Result.ExitStatus |
||||
} else { |
||||
$ExitStatus = "Timeout!" |
||||
$TimeSpan = $null |
||||
} |
||||
|
||||
if ($Result.ExitStatus -eq 0) { |
||||
# Exited gracefully! |
||||
$Status = "`e[32mPass`e[0m" |
||||
$ExitDisplay = "`e[32m$ExitStatus`e[0m" |
||||
} else { |
||||
$ExitDisplay = "`e[31m$ExitStatus`e[0m" |
||||
|
||||
# Otherwise, fail! |
||||
$Status = "`e[31m`e[1mFail`e[0m" |
||||
$FailureCount += 1 |
||||
} |
||||
|
||||
# Clean up! |
||||
Remove-Job -force $Job |
||||
|
||||
[PSCustomObject]@{ |
||||
Name = $FileInfo.Name |
||||
State = $Status |
||||
ExitStatus = $ExitDisplay |
||||
Time = $TimeSpan |
||||
} |
||||
} |
||||
|
||||
Get-ChildItem -Recurse -File -Path $Path -Filter $Filter | ForEach-Object { |
||||
Write-Host ("`e[36m-- {0}`e[0m" -f $_.Name) |
||||
|
||||
$ShouldSkip = $false |
||||
foreach($F in $Skip) { |
||||
if ($_.Name -like $F) { |
||||
Write-Host "`e[33m`e[1mSkipped by wildcard:`e[0m $F" |
||||
$ShouldSkip = $true |
||||
break |
||||
} |
||||
} |
||||
|
||||
# Put into a hash table and append to a list for table magic! |
||||
if (-not $ShouldSkip) { |
||||
$Results += Run-Example $_ |
||||
} else { |
||||
$Results += [PSCustomObject]@{ |
||||
Name = $_.Name |
||||
State = "`e[33m`e[1mSkip`e[0m" |
||||
ExitStatus = $null |
||||
Time = $null |
||||
} |
||||
} |
||||
} |
||||
|
||||
$Results | Format-Table |
||||
|
||||
if ($FailureCount -gt 0) { |
||||
throw "$FailureCount failed jobs!" |
||||
} |
Loading…
Reference in new issue