Revīziju grafs

2740 Revīzijas

Autors SHA1 Ziņojums Datums
Lancelot Six a95209dde6 libhsakmt: gfx950 uses same VGPR block size as gfx940
Make sure to use allocate the same amount of size for VGPR data in
gfx950 as it is done for gfx940.

Change-Id: I6a0820996389627ccbdfef856e5150c46fac92a1
Signed-off-by: Lancelot SIX <lancelot.six@amd.com>


[ROCm/ROCR-Runtime commit: 76052ba028]
2025-01-27 14:06:42 -05:00
Shweta Khatri 4325142db1 rocr: Use view3dAs2dArray flag, for thick/3D swizzle modes.
Added HSA_IMAGE_ENABLE_3D_SWIZZLE_DEBUG environment flag to
enable/disable this. Default value is false (view3dAs2dArray = 1)
Enabling this flag will enable support for swizzles that do 3D
interleaving. Note that all features of 3D images are supported
with 2D swizzles,it's just that the access patterns are different
and therefore cache hit-rates may be better or worse, depending
on how it's used. Volumetric algorithms do better with 3D and apps
that tend to access a single slice at a time do better with 2D.

Change-Id: Id8574a6710fe4333a1ee331e5ce9195a81434198


[ROCm/ROCR-Runtime commit: 6361466baa]
2025-01-27 09:28:33 -05:00
Tony Gutierrez ff52d6fc13 rocr: Add WaitMultiple to core Signal
Replaces WaitAny with WaitMultiple to more closely align with the
underlying driver API for waiting on multiple events.

WaitMultiple adds a single parameter, wait_on_all, to the WaitAny
interface providing a single function for waiting on multiple
events when we only need AND and OR semantics for the signal
checking logic.

Change-Id: I68a4a45d48151d9d69aef02fd8f7263b9e6c0e75


[ROCm/ROCR-Runtime commit: 8a38f121ea]
2025-01-27 09:21:43 -05:00
Lancelot Six c7b1fd714e libhsakmt: Use the node info to determine LDS size
The CWSR area size needs to take into account the size of LDS each
active workgroup can have.  The current implementation uses a constant
for that.  This patch refactors this to use the HsaNodeProperties of the
device's the CWSR area is for to figure out the size of LDS.

Change-Id: Ib8585b2b7140ec5c99e7b7d62e67f785697c028a
Signed-off-by: Lancelot Six <Lancelot.Six@amd.com>
Signed-off-by: Amber Lin <Amber.Lin@amd.com>


[ROCm/ROCR-Runtime commit: c51aa0d155]
2025-01-26 21:46:32 -05:00
Alex Sierra da483d7588 kfdtest: add support for gfx9.5.0 in shader store
Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Change-Id: I48b98ff631bd1aa1a044b60583ff256e43b17423


[ROCm/ROCR-Runtime commit: 268054cd28]
2025-01-26 21:45:07 -05:00
Alex Sierra 840a613723 kfdtest: Add gfx 9.5 as FAMILY_AV
Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Change-Id: Ib5696eee1d4f64c9c87d714eae7c80fbbd1e2b23


[ROCm/ROCR-Runtime commit: e94ff8a36c]
2025-01-26 21:43:55 -05:00
David Yat Sin d0ae8b2eb5 rocr: Add support for gfx950
<squashed with patch for gfx950 generic targets>

Signed-off-by: Chris Freehill <Chris.Freehill@amd.com>

Change-Id: Ifec6d93cf46c7fbf736c6572882299e279260af6


[ROCm/ROCR-Runtime commit: dab8f2fc65]
2025-01-26 13:04:58 -05:00
Ben Vanik bda034bb82 rocr: Fix HostQueue to obey the alignment requirement
Change-Id: I06542e9ff94e826ca0abba0328b301fec50a95ea


[ROCm/ROCR-Runtime commit: 7d64fe49fa]
2025-01-24 12:08:11 -05:00
David Yat Sin 922b61ddee rocr: Add thread priority for AsyncEventHandler
Set priority to maximum for signal event handler and minimum for
exceptions event handler.

Change-Id: I1b982d3c2e4c880fafc073fe1a542d01692a6fdc


[ROCm/ROCR-Runtime commit: 7ea25ebb85]
2025-01-24 10:08:12 -05:00
Ben Vanik 15cc61baf4 rocr: Fixing non-portable inline attribute on hsa_flag_* utilities.
Change-Id: Ie1c53fef407a71b5ec4c6eaf3a3ed00871184408


[ROCm/ROCR-Runtime commit: 9971e7b004]
2025-01-23 15:09:21 -05:00
Tony Gutierrez e82871f20b rocr: Generalize driver discovery
Generalize the driver discovery and move driver-specific
functionality to the concrete driver implementations.
Currently, this process is tightly coupled to the hsakmt
which is GPU and OS specific.

Change-Id: Ie1c53fef407a71b5ec4c6eaf3a3ed00871184409


[ROCm/ROCR-Runtime commit: 15107afb11]
2025-01-23 15:09:14 -05:00
Tony Gutierrez c325fac9ba rocr: Make Open() and Close() virtual in Driver
Change-Id: Iac054c08383b080ca2b2ec6d65019bf2f083b763


[ROCm/ROCR-Runtime commit: 77fa5af618]
2025-01-23 15:09:06 -05:00
Tony Gutierrez d6504e1f2d rocr: Forward declare Driver in the Agent class
Change-Id: Ib27081bf31446af92602f723f352fb75ec3f378e


[ROCm/ROCR-Runtime commit: 8bbc44d51b]
2025-01-23 15:08:59 -05:00
Shweta Khatri c5822cee5a Revert "Revert "hsakmt: Only set exec flag when requested""
This reverts commit 5a8092bccf.

Reason for revert: This will put back the change ID - Id1154f08f6ba21c633905fd46b06053994d6f3cc to ROCR repo, which will prevent memory allocations from being automatically granted the 'executable' flag, addressing previously -  incorrect and unsafe behavior in ROCm driver.

Change-Id: I3d45c45859929a80f7791681b411251e099a1901


[ROCm/ROCR-Runtime commit: 2d4a578020]
2025-01-23 09:08:25 -05:00
Longlong Yao 0b1dc71200 rocr: add AMD_KERNEL_CODE_PROPERTIES_ENABLE_WAVEFRONT_SIZE32
Change-Id: I158705499f4ab0b1231d698d66902eb4ab1ececa
Signed-off-by: LonglongYao <Longlong.Yao@amd.com>


[ROCm/ROCR-Runtime commit: 5d8fba133d]
2025-01-22 13:02:31 -05:00
David Yat Sin 4c87e51013 Update license for 2025
Change-Id: Ie3c7f6034c9a73d9a4af3c1432ed7ac3b4a6a3b1


[ROCm/ROCR-Runtime commit: ff671f7550]
2025-01-21 15:28:57 -05:00
Swati Rawat 10004bd358 Update index.rst
Change-Id: I493e3dc3782608e4d0d712569a6e6fd3b376cdbe


[ROCm/ROCR-Runtime commit: 77c2a21a92]
2025-01-21 10:05:28 -05:00
Apurv Mishra 4ea98d22c4 hsakmt: move 'counter_id' array to heap
local variable 'counter_id' exceeded the max single
use of stack, thus move to heap to prevent overflow

also, use of a contiguous memory block for 2D array
to reduce space complexity, add error messages for
NO_MEMORY exits and check MAX_COUNTER limit for IDs

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


[ROCm/ROCR-Runtime commit: ecf57310ca]
2025-01-13 16:29:16 -05:00
Harish Kasiviswanathan e004ab79f5 kfdtest: Fix KFDASMTest failure on older ASICs
HW_REG_HW_ID1 is only available from gfx12 onwards

Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Change-Id: Ibf4bd62e01ada3dee6dd88762ccb853bab63ff87


[ROCm/ROCR-Runtime commit: 1d71975fcc]
2025-01-13 15:22:20 -05:00
Harish Kasiviswanathan 0c461ee74a kfdtest: Add gfx12 to TargetList for AssembleShaders
Add gfx12 so that it gets tested when KFDASMTest.AssembleShaders is run.
GWS support has been removed for gfx12. Modify shaders to take that into
account.

Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Change-Id: I70e87febb6388852ea54d69cf9201339a7910581


[ROCm/ROCR-Runtime commit: f8ae5c47ba]
2025-01-13 15:22:15 -05:00
Chris Freehill abd81afb9c rocr: Remove RuntimeCleanup and use of loaded()
The recent static initialization changes cause this clean up to
happen when it previously never did. The result of ~RuntimeCleanup()
being executed is that the static global "loaded_" is set to false,
which in turn prevents hsa_init() from executing again. Clean up
already happens when hsa_shut_down() occurs.

Change-Id: Ib5cefb80d82880c1945e04eb6ec246bc2c7d2324


[ROCm/ROCR-Runtime commit: b1d6cacf79]
2025-01-13 09:18:13 -05:00
Lang Yu 6c18e6188d kfdtest: consolidate LoopIsa
1, Initialize the registers before using them is the best practice.
Though the use case here doesn't care whether the registers are
initialized or not, some emulators complain the "read_before_write"
behavior. Initialize the registers used to silence these complaints.

2, Update s_wait stuff for gfx12.

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


[ROCm/ROCR-Runtime commit: fe5f12342d]
2025-01-10 21:27:23 -05:00
Kent Russell f256811bab kfdtest: Can't initialize variable-sized objects
Do a memset, since we can't initialize variable-sized objects

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


[ROCm/ROCR-Runtime commit: cc7ff73e7f]
2025-01-09 10:36:06 -05:00
Tim Huang 910ccbbd32 kfdtest: add blacklist for gfx1153
Change-Id: I1f132858cb79c6d0561477fe8ce69aafd93ad351
Signed-off-by: Tim Huang <tim.huang@amd.com>


[ROCm/ROCR-Runtime commit: 7bad0cb4a1]
2025-01-08 21:20:17 -05:00
David Belanger 80523eef97 kfdtest: Add ExtendedCuMasking test case
New implementation of CU mask testing that focuses on correctness of
masking.  Unlike previous implementations, this new implementation does not
rely on performance measurements to decide on the results of the test.
Instead, this implementation checks if waves were executed on all the CUs
enabled and only the CUs enabled.

Test case initially supported on GFX12.

Signed-off-by: David Belanger <david.belanger@amd.com>
Change-Id: I5af8b890179bc9a415fc7f47e736f4971fc40c4a


[ROCm/ROCR-Runtime commit: 9667af97d9]
2025-01-08 17:36:59 -05:00
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