Commit Graph

2715 Commitit

Tekijä SHA1 Viesti Päivämäärä
Kent Russell fba20de05e kfdtest: Explicitly include tuple in KFDCWSR
We can inherit it from gtest, but not in ASAN builds. And we should be
including what we use, instead of hoping to inherit it through other
headers

Change-Id: Id47ab06a57e1c71c88f72da5f21a71f37db8a2f3
Signed-off-by: Kent Russell <kent.russell@amd.com>


[ROCm/ROCR-Runtime commit: eda54222ea]
2025-01-07 13:57:36 -05:00
James Zhu bf1d1606c9 libhsakmt: add spm buffer header
to send data back to user.

Change-Id: If11fb4147e32c0eed319ccf76bcde9d76815ff67
Signed-off-by: James Zhu <James.Zhu@amd.com>


[ROCm/ROCR-Runtime commit: b07a80e505]
2025-01-06 14:40:05 -05:00
Flora Cui 5587fa5224 rocr: try DefaultSignal if interrupt is disabled
Reviewed-by: Shane Xiao <shane.xiao@amd.com>
Change-Id: I5d3a3813f56990f3aca61be23215faeb0a9629cb
Signed-off-by: Flora Cui <flora.cui@amd.com>


[ROCm/ROCR-Runtime commit: 2cc279dbbc]
2025-01-02 11:09:20 +08:00
Shane Xiao 6e0b1642b3 rocr: Fix missed read lock in ExecutableImpl::FindHostAddress
Change-Id: Ide9b5cc3aa235d3768ebbfd8dc1560bf70fd0743
Signed-off-by: Shane Xiao <shane.xiao@amd.com>
Reviewed-by: Qiang Yu <qiang.yu@amd.com>


[ROCm/ROCR-Runtime commit: 2d40493c31]
2024-12-30 06:43:25 -05:00
Tim Huang 8a853c2539 rocrtst: add gfx1153 to the default targets
Change-Id: I6cce4f924c236ea83cbe0ab9402c0cabdb202356
Signed-off-by: Tim Huang <tim.huang@amd.com>


[ROCm/ROCR-Runtime commit: 0f507e7690]
2024-12-30 02:06:01 -05:00
Tim Huang 30f1a5f582 rocr: add ISA target support for GC version 11.5.3
This add support for GC version 11.5.3

Change-Id: I1d55e33198620d3493967558c25c636d5f7ab347
Signed-off-by: Tim Huang <tim.huang@amd.com>


[ROCm/ROCR-Runtime commit: e515b0bca5]
2024-12-30 01:44:53 -05:00
Prike Liang 5a42f09755 rocrtst/test_common: correct the amdgcn header path
Change-Id: Iae31668d16253ee0bfda82f207463d19b2e0973a
Signed-off-by: Prike Liang <Prike.Liang@amd.com>


[ROCm/ROCR-Runtime commit: c5a5b785bf]
2024-12-24 12:44:22 -05:00
Chris Freehill 6c04d75c3f rocr: Dynamically allocate IsaMap
This is to avoid use after free at the program's end, when statics
are destructed.

Change-Id: Id6bf26f25a58d13bdf1ee99c852adae8add76569


[ROCm/ROCR-Runtime commit: 67b0082443]
2024-12-20 09:20:09 -05:00
Flora Cui 6a3d0e6412 rocr: skip exception_signal_ handling on exit
if .supports_exception_debugging is not enabled.

Change-Id: I944fe7aa4f3068964f47e23f5259c3802d1e9556
Signed-off-by: Flora Cui <flora.cui@amd.com>


[ROCm/ROCR-Runtime commit: ac64c54d74]
2024-12-19 04:14:32 -05:00
Xiaogang Chen 6c592fa29e kfdtest: fix a regession on KFDEvictTest test case
The kfdtest multi-gpu extension only allows using the first gpu(in topology
order) as default gpu for KFDEvictTest test case. We should allow user
to select any gpu in system as default gpu to run KFDEvictTest test case.

Signed-off-by: Xiaogang Chen<Xiaogang.Chen@amd.com>
Change-Id: I8848771d92ae2812fbb96e917454ab3b4a71a2fa


[ROCm/ROCR-Runtime commit: eafa929520]
2024-12-18 10:13:54 -06:00
Apurv Mishra 23ab95b5f2 rocr: multiple uninitialized and unused variables
Minor modifications to multiple source and header
files based on Coverity report

Change-Id: I4a73d0f56640983c4d5124e13c8c280245cca672
Signed-off-by: Apurv Mishra <apurv.mishra@amd.com>


[ROCm/ROCR-Runtime commit: 699d0140be]
2024-12-18 10:11:13 -05:00
Apurv Mishra 2f2cb50cf2 rocr: refactor of runtime.cpp based on Coverity
Add return checks, initialization and clean
redundant memory operations

fix 1: check return value of 'setsockopt' for error
fix 2: check return value of 'PtrInfo' for error
fix 3: move 'tool_names' instead of copying
fix 4: call 'munmap' for 'va' only once
fix 5: use 'ssize' for possible return values of -1 (err)
fix 6: add missing initialization in constructors
fix 7: add initialization for some scalars and pointers

Change-Id: I07d90e36d4e1fe48c4de4f44e18083e5ed4c5fbc
Signed-off-by: Apurv Mishra <apurv.mishra@amd.com>


[ROCm/ROCR-Runtime commit: 441bd9fe6c]
2024-12-18 10:06:55 -05:00
Horatio Zhang 828859b784 rocrtst: fix build error for opencl-c.h
<built-in>:2:10: fatal error: '/opt/rocm/llvm/lib/clang/18/includeopencl-c.h' file not found
    2 | #include "/opt/rocm/llvm/lib/clang/18/includeopencl-c.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Change-Id: I56138aba15465b6dd47bb3aad810bdd10f2b2a74
Signed-off-by: Horatio Zhang <Hongkun.Zhang@amd.com>


[ROCm/ROCR-Runtime commit: b02b842368]
2024-12-16 21:28:09 -05:00
Xiaogang Chen c1158a6c76 kfdtest: update run_kfdtest.sh when HSA_TEST_GPUS_NUM is enable
Signed-off-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Change-Id: I68e4f4f8fd7397d3b39b3473638836e4531bef2b


[ROCm/ROCR-Runtime commit: ec457752dc]
2024-12-16 12:47:50 -05:00
Xiaogang Chen 2c102990ae kfdtest: Convert KFDSVMRangeTest into multi-GPU test framework
Signed-off-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Change-Id: Ia4d55c38576c39b3768a847c60d70bda88f65740


[ROCm/ROCR-Runtime commit: cbb38606e3]
2024-12-16 12:47:44 -05:00
Xiaogang Chen bebd577f6a kfdtest: Convert KFDLocalMemoryTest into multi-GPU test framework
Signed-off-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Change-Id: Iaf20ec15e85ed10998e9735881d3c029abedd3a4


[ROCm/ROCR-Runtime commit: 641f1f797d]
2024-12-16 12:47:39 -05:00
Xiaogang Chen efa2d187f1 kfdtest: Convert KFDMemoryTest into multi-GPU test framework
Signed-off-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Change-Id: I29d7fbb156a88b4df5be5f2fa0c20fbc47b108ed


[ROCm/ROCR-Runtime commit: 10c9b98f6e]
2024-12-16 12:47:34 -05:00
Xiaogang Chen 3925a57cf2 kfdtest: Convert KFDQMTest into multi-GPU test framework
Signed-off-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Change-Id: Ia3582ab5b802ead4df267eeb280b8e7d37eb0ac2


[ROCm/ROCR-Runtime commit: f229605b06]
2024-12-16 12:47:28 -05:00
Xiaogang Chen 513fa002e3 kfdtest: Convert KFDExceptionTest into multi-GPU test framework
Signed-off-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Change-Id: I545ac485d13a3a56a3b352926ec71daa5b074862


[ROCm/ROCR-Runtime commit: dbccf11ef8]
2024-12-16 12:47:21 -05:00
Xiaogang Chen 8f28056009 kfdtest: Convert KFDEventTest into multi-GPU test framework
Signed-off-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Change-Id: Id1dc91f654686f159adb1bc70907e11558ee4be0


[ROCm/ROCR-Runtime commit: 0357e2e139]
2024-12-16 12:47:14 -05:00
Xiaogang Chen 77aa32b913 kfdtest: Convert KFDCWSRTest into multi-GPU test framework
Signed-off-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Change-Id: I51646ebd95b2ef4820f7b503bd642deb05a86930


[ROCm/ROCR-Runtime commit: fa31caddba]
2024-12-16 12:47:08 -05:00
Xiaogang Chen 92c4010903 kfdtest: Convert KFDGWSTest into multi-GPU test framework
Signed-off-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Change-Id: I0901750b2ce55bd7f44425b01442d98f0faf12fd


[ROCm/ROCR-Runtime commit: 6c6daf66bf]
2024-12-16 12:47:01 -05:00
Xiaogang Chen a17b24b062 kfdtest: convert KFDGraphicsInterop into multi-GPU test framework
Signed-off-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Change-Id: I590be9ea063b0d115641aa5b40be4c376377c1dd


[ROCm/ROCR-Runtime commit: 759ca45f54]
2024-12-16 12:46:55 -05:00
Xiaogang Chen 35939040ba kfdtest: convert KFDPerfCountersTest into multi-GPU test framework
Signed-off-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Change-Id: I29124147394b69c7fb5533a0e54d375d06b1ec13


[ROCm/ROCR-Runtime commit: dd1801df41]
2024-12-16 12:46:49 -05:00
Xiaogang Chen 23a24fb48a kfdtest: Update KFDMultiProcessTest class to support kfdtest run on multiple gpu
Update KFDMultiProcessTest class to fork process on gpu wise.

Signed-off-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Change-Id: Ibb12d64b4cbc5f082d737fd8d8a74233b75be13e


[ROCm/ROCR-Runtime commit: c69e660e7a]
2024-12-16 12:46:42 -05:00
Xiaogang Chen 58e0937fb4 kfdtest: Implement an infracture to support kfdtest run on multi gpu
Update class KFDBaseComponentTest to have kfdtest run on multi gpu under google test framework.

Signed-off-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Change-Id: If139c4fc6cf062fb800ff171c69cbf9604f98278


[ROCm/ROCR-Runtime commit: b4943d718b]
2024-12-16 12:46:32 -05:00
Xiaogang Chen 7ca6b20d3f kfdtest: Add an env variable to control kfdtest on multi gpu
Add HSA_TEST_GPUS_NUM env variable that controls gpu number kfdtest uses.

This env variable will be used by following patches.

Signed-off-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Change-Id: I800042f93d4e0955040f450e9b5cf09927971323


[ROCm/ROCR-Runtime commit: 665e6f80bf]
2024-12-16 12:46:25 -05:00
Xiaogang Chen b8279a6de1 kfdtest: Extend gtest log functions
Extend Google test log functions to extend kfdtest running on multiple gpu.

Signed-off-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Change-Id: I6d8de92fec606309756423b3a6fa2af3558c0517


[ROCm/ROCR-Runtime commit: 36a82593ed]
2024-12-16 12:46:16 -05:00
Xiaogang Chen ca76e3fde0 kfdtest: Separate LLVM initialization and instantiation
Assembler function from LLVM is not multi-thread safe and is ASIC dependent.
To extend kfdtest to test on multiple GPU separate LLVM initialization and
assembler instantiation. Each test uses its own assembler.

Signed-off-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Change-Id: I94c996e807b81d8b19361b450be985b12042477c


[ROCm/ROCR-Runtime commit: e1fdd6fb5f]
2024-12-16 12:46:07 -05:00
David Yat Sin 95ee8b36d7 rocr: Avoid deadlock due to queue signal not updated
Make sure waiting_ count for queue signal is always > 0 so that we
always call hsaKmtWaitOnEvent to force hsaKmtWaitOnEvent to return.

Remove incorrect warning print when running in debug mode.

Call internal Signal::WaitAny instead of AMD::hsa_amd_signal_wait_any
to avoid extra function calls.

Change-Id: I9e41b704643e4e8ee7402b1379b1c30ff4c544ef


[ROCm/ROCR-Runtime commit: 5da1889fb7]
2024-12-16 10:25:19 -05:00
Chris Freehill 42662ee44c rocr: Check generic feature compability separately
Check that generic ISAs are compatible with an agent separately
from where feature compatibility is checked.

Change-Id: I403012db5536ff1f2faf93cf013db03ef07ac1c8


[ROCm/ROCR-Runtime commit: e93efba9cc]
2024-12-11 16:08:44 -05:00
gaba 851cccdce5 kfdtest: Modify system Buf testing size
When using total system memory to test on some motherboard,
the test take very long time, witch looks like system Hang.

Change-Id: Ic31fe60cfb1363fbc8a2d8f7e1cb2bae0e149ea8
Signed-off-by: gaba <gaba@amd.com>


[ROCm/ROCR-Runtime commit: 8c35523225]
2024-12-10 10:55:55 -05:00
Eddie Richter 8ea388af92 rocr/aie: AIE Queue Processing
Change-Id: I681c971ba7229037ca85d5529838aa7bbe5820e2


[ROCm/ROCR-Runtime commit: e9cc839b2b]
2024-12-10 10:50:02 -05:00
Yiannis Papadopoulos a317650289 rocr/aie: Add AIEAgent missing info
Change-Id: I32e9acc7b8b7dee4e9ff5524fec5c440bb8ece0e


[ROCm/ROCR-Runtime commit: c343a9dc60]
2024-12-07 00:04:54 +00:00
Apurv Mishra 1a7d1fd378 rocr: initialize 'data_rdy' & correct 'const' functions
'const' member functions have syntax errors and struct
'data_rdy' have uninitialized members

v1: correct misplaced 'const' for member functions
v2: add initialization for 'data_rdy' in constructor

Change-Id: I29bada475217c9df81f0d0400e7a3f44aa8afe0c
Signed-off-by: Apurv Mishra <apurv.mishra@amd.com>


[ROCm/ROCR-Runtime commit: c48e8a918e]
2024-12-06 09:17:02 -05:00
David Yat Sin bd5d032fba Add clang-format file
Change-Id: Iaa207895b027227c0eae51b899f0d2e41e3f64b8


[ROCm/ROCR-Runtime commit: b7a420f7b7]
2024-12-05 11:47:35 -05:00
David Yat Sin b7208786a2 rocr: Avoid polling for SDMA signals
When all 64-bits of the signal value are 0, we can skip polling for that
signal.
We need to keep signals as 64-bit numbers as part of the spec. But most
users of ROCr do will never set the signal value to more than 32-bits.
When the dependent-signals are less than 32-bits, avoid adding extra
SDMA poll packet as this adds latency to the SDMA copies.

Change-Id: I37dca65fe3f060dc7164f49b98cb1985023663c4


[ROCm/ROCR-Runtime commit: 0544c2336b]
2024-12-04 16:45:04 -05:00
Chris Freehill 2a492e6f04 rocr: Add gfx9-4-generic support
Change-Id: I4ebfbf0dcffa5b784d7fbfda7398d44dcc47aaef


[ROCm/ROCR-Runtime commit: f32e264933]
2024-12-03 19:33:57 -05:00
Lang Yu 04a13608b7 kfdtest: update PersistentIterateIsa for gfx12
1, Use s_wait_* instead of s_waitcnt
2, Remove a redundant s_waitcnt

Change-Id: Id0f31db0fc520adadd81eb574ad389f63859303a
Signed-off-by: Lang Yu <lang.yu@amd.com>


[ROCm/ROCR-Runtime commit: 37135aadfa]
2024-12-02 19:59:57 -05:00
taosang2 a5de0f048d rocr: Support different address modes
Support different address modes in X, Y, Z directions

Change-Id: If1db5a8af33c92ddc4b48968c3d8eceb97daea6a


[ROCm/ROCR-Runtime commit: df250a49a5]
2024-12-02 09:07:56 -05:00
David Yat Sin 91a28fce54 rocr: Move _loader_debug_state to rocr namespace
This avoids exposing the symbol to the default namespace

Change-Id: I2fe5fbab4b59f271effacab93eeb2d95c236ae02


[ROCm/ROCR-Runtime commit: 147abb6ca0]
2024-11-29 10:44:23 -05:00
Apurv Mishra 55064cbb4c hsakmt: modified to free all_gpu_id_array in fmm.c
Add free() for 'all_gpu_id_array' in
hsakmt_fmm_destroy_process_apertures() and
removed it from 'hsakmt_fmm_clear_all_mem()'

Change-Id: I32d2d22e7152f62a3f2e7da4f601f0db7cebd534
Signed-off-by: Apurv Mishra <apurv.mishra@amd.com>


[ROCm/ROCR-Runtime commit: c066ec13dd]
2024-11-28 13:08:03 -05:00
Apurv Mishra 05e927bcb0 hsakmt: minor code cleanup and refactor topology.c
removed unused value assignment for HSAKMT_STATUS,
restructured 'topology_sysfs_check_node_supported'

Change-Id: I21cdccb3e3c5e42981f10597426de479d0f4ee6a
Signed-off-by: Apurv Mishra <apurv.mishra@amd.com>


[ROCm/ROCR-Runtime commit: 79f0ac2534]
2024-11-28 13:06:23 -05:00
Emily Deng 7aa33126cf kfdtest: fix event leaks issue
DisableCpQueueByUpdateWithZeroPercentage need to destroy event to avoid
event leak.

Signed-off-by: Emily Deng <Emily.Deng@amd.com>
Change-Id: I4fb51b670fbff1edcd7fd61517f5c8a6674003c0


[ROCm/ROCR-Runtime commit: 1f9c080932]
2024-11-27 19:33:10 -05:00
Chris Freehill ed575729bd rocr: Dynamically allocate supported_isas map
This was missing from a previous commit regarding
dynamically allocated static data structures.

Change-Id: Iae1c674e762f85e3aebf338210ba96942ba80278


[ROCm/ROCR-Runtime commit: eec2130443]
2024-11-27 11:11:22 -05:00
Apurv Mishra baf737a3cb rocr: declare 'args' as class member in 'os_thread'
Removed 'args' as a unique pointer and deletion in
'ThreadTrampoline', then declared as a class member.

Change-Id: Ia52058392d0170e8b5e57cfdd2c587f47a6f93f0
Signed-off-by: Apurv Mishra <apurv.mishra@amd.com>


[ROCm/ROCR-Runtime commit: 89115369cc]
2024-11-27 10:27:40 -05:00
Emily Deng 7f0c2de9ad kfdtest: Fix the dead lock SignalHandling
The issue arises in the CatchSignal function, which attempts to write to
the standard error stream upon receiving a signal. However, the standard
error stream may already be locked at this point, as the parent process
also attempts to write to the standard error stream after mapping the GPU
memory. This leads to a deadlock, with the program waiting for the
release of the lock on the standard error stream.

Signed-off-by: Emily Deng <Emily.Deng@amd.com>
Change-Id: Ie69354f4342b96ffe1f2a87f655687da1cbee4b9


[ROCm/ROCR-Runtime commit: c8031f2a69]
2024-11-26 19:39:45 -05:00
Eric Huang c931ec17d4 kfdtest: increase test timeout and optimize evict tests timeout
there are some timeout issues of evict tests on recent new boards,
it is to solve those issues and optimize evict timeout, as well
as to give user a chance to change timeout in command line.

Signed-off-by: Eric Huang <jinhuieric.huang@amd.com>
Change-Id: I2f40c8ea809c55675b0d0b62296b663481e5fb16


[ROCm/ROCR-Runtime commit: 09b899b079]
2024-11-26 11:04:29 -05:00
Apurv Mishra b552e9d15d rocr: initialized missing fields in ext_table
Added initializations for 'ext_table' in 'hsa_system_get_major_extension_table()'

Change-Id: I5e46592192b7d7a294d30011481f16e93db11794
Signed-off-by: Apurv Mishra <apurv.mishra@amd.com>
Reviewed-by: David Yat Sin <david.yatsin@amd.com>


[ROCm/ROCR-Runtime commit: d91a14ae0c]
2024-11-26 10:45:29 -05:00
Shweta Khatri 7019761f4f rocrtst: Disable FreeQueueRingBufferTest temporarily
This test is disabled until kernel patches are added to handle invalid
user actions gracefully. These patches validate and block operations
like freeing active queue buffers, which can corrupt the driver's state
if unhandled.

Currently, such operations result in driver state corruption, leading
to segmentation faults and subsequent failures during runtime.

Change-Id: If4c321a14df950a639141fc96048889659c14477


[ROCm/ROCR-Runtime commit: 2cf3813f9f]
2024-11-26 09:18:47 -05:00