Граф коммитов

2925 Коммитов

Автор SHA1 Сообщение Дата
Sean Keely 2692cac562 Add check_required_components to end of cmake package file.
Sets package found and component lists.  ROCr does not have components
so this is mostly cosmetic.  It's part of maintaining a compliant
cmake project config file though.

Change-Id: Ida2ef746375143babd3a6f938727a47135606f01


[ROCm/ROCR-Runtime commit: 9e7d4629ca]
2021-08-27 20:07:26 -04:00
Sean Keely 9870e8b576 Correct queue exception hander termination.
Set handler state to terminated before exiting.
Also simplify scratch handler exit loop.

Change-Id: I0a80c8a1899e8b60a6e7aa6989ba28de42ba31e7


[ROCm/ROCR-Runtime commit: e06dd39d89]
2021-08-27 20:06:44 -04:00
Sean Keely bd71510eaa Minor spelling fix in comments.
Change-Id: Ia99ac3f75444675be48b3d965552fab79da37c92


[ROCm/ROCR-Runtime commit: 76e6ff0411]
2021-08-27 20:06:17 -04:00
Sean Keely 0ad218cbab Build fix for older clang compilers.
Per clang 13 option -Wno-error=unused-but-set-variable is not
recoginized nor is the diagnostic emitted.  Set this option
conditional to the clang compiler version.

Change-Id: I3c0958dffa985d53b641f9eff4e702988dffd033


[ROCm/ROCR-Runtime commit: eec545fd9f]
2021-08-27 20:06:10 -04:00
Sean Keely 07103a6b97 Allow passing zero bits into hsa_amd_queue_cu_set_mask.
Passing 0 into num_cu_mask_count used to be an implicit error.
This has been repurposed as a short hand for enabling all CUs.
Enabling all CUs when HSA_CU_MASK is set will cause the CU mask to
reset to whatever was set by HSA_CU_MASK which may then be queried.

Change-Id: I1d6bb2034595a78ee48fa72aa05563e8ea6c0fff


[ROCm/ROCR-Runtime commit: 02666ec0f1]
2021-08-27 20:05:24 -04:00
Sean Keely dbba14f823 Improve HSA_CU_MASK parsing efficiency.
Delay parsing until after GPU discovery.  Use the surfaced
GPU count and maximum phyiscal CU count to limit parsed bit masks.

This prevents pathological input such as
HSA_CU_MASK=0-8000000:0-8000000 from attempting to consume 7TiB.

Change-Id: I3773d2db3740c2023b0f6275d1818b69119b0495


[ROCm/ROCR-Runtime commit: 2aa0795b33]
2021-08-27 20:05:18 -04:00
Kent Russell 9a063d7e6e CMakeLists: Make sure package provides hsakmt-roct for RPM
RPMs were missed initially

Change-Id: Id9d3fdcb41a25db90c9de71e2035de61928e9a32


[ROCm/ROCR-Runtime commit: af31e9364a]
2021-08-27 07:47:20 -04:00
Mike Li d919321fd4 Get Marketing name from libdrm-amdgpu
Use the database provided by libdrm-amdgpu,as this is maintained by AMD

Signed-off-by: Mike Li <Tianxinmike.Li@amd.com>
Change-Id: I319a46d833cb23173a77fdff1deae69ea58588b8


[ROCm/ROCR-Runtime commit: cb1c84d99b]
2021-08-26 16:43:31 -04:00
Kent Russell eb7a1eea27 CMakeLists: Combine binary and devel packages
Consolidate all thunk components into a single development package
Also declare build dependencies via find_package/library and report the
location of said dependencies during build time

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


[ROCm/ROCR-Runtime commit: 79d00a35f9]
2021-08-26 14:38:10 -04:00
Tony Tye e173a57a05 Update HSA_RUNTIME_ENABLE_MIN_MAJOR to 10
The major version of the debug ioctl functions has been updated to 10.

Change-Id: Iddc8656ad07c92aa30c6a7a99add28ab3a3f5a80


[ROCm/ROCR-Runtime commit: d0ae4b1f3f]
2021-08-21 21:47:09 +00:00
Mukul Joshi b0c12655b0 kfdtest: Update KFDCWSRTest for software scheduler and MES
Update KFDCWSRTest.BasicTest to run CWSR test with legacy HWS,
MES, and software scheduler.

Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Change-Id: I09af904507109c2bbbace6ff616a57fa2b1b8aa9


[ROCm/ROCR-Runtime commit: acd5eda54f]
2021-08-20 16:37:50 -04:00
Kent Russell 7cc3211f13 kfdtest.exclude: Remove KFDEvictTest.BurstyTest on all ASICs
This is reported as failing on pretty much every ASIC, so move it to the
temporary exclude list for all ASICs until the test can be fixed.

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


[ROCm/ROCR-Runtime commit: 52f5b666d6]
2021-08-17 08:27:13 -04:00
Sean Keely e615e35e0e Add emulator build notification to rocrtst.
Change-Id: I3eb5fd5ec26541f3459aebf289d25c942f09da02


[ROCm/ROCR-Runtime commit: 7512c32f69]
2021-08-13 16:46:26 -05:00
Graham Sider e12ae580bb libhsakmt: Hotfix for incorrect hex gfx versions
Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: Ic67b7a3e1649288c8fdef85fef875327ffc50948


[ROCm/ROCR-Runtime commit: 9745c58d40]
2021-08-11 16:59:44 -04:00
Chengming Gui 0bb3052e1a libhsakmt: Add DIDs for Beige_Goby
Signed-off-by: Chengming Gui <Jack.Gui@amd.com>
Change-Id: Iff82aa0ab70df49ffc6d8004e40b5cccd637da44


[ROCm/ROCR-Runtime commit: cff8e4992c]
2021-08-09 11:32:11 +08:00
Graham Sider 67e7a73dc4 libhsakmt: Retrieve gfx version from sysfs
If lookup is successful, device info from find_hsa_gfxip_device() is
used to populate props->EngineId.ui32 gfx version fields and node CAL
name (props->AMDName).

If unsuccessful, uses gfx_target_version sysfs field if present
(otherwise results in error), and sets the node CAL name to
"GFX<GFX_VERSION>" (e.g. 9.0.8 -> GFX090008).

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: Id39c521b769aebbe40c934f19e03150a66884cce


[ROCm/ROCR-Runtime commit: bb8deeae11]
2021-08-05 15:19:57 -04:00
Graham Sider dd6fc61c2d libhsakmt: Remove redundant checks, small bug fixes
Some g_system and Node ID checks already performed by validate_nodeid().
Fixes bug where hsaKmtGetNodeProperties() would return on
validate_nodeid() error without releasing lock. Switches some
conditionals to return INVALID_NODE_UNIT instead of INVALID_PARAMETER if
NodeId >= NumNodes. Removes some g_system assertions to return error
code rather than trigger a hard fault.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: Id1604b20c2cef8808b98cdad61bd47aa7ea3d229


[ROCm/ROCR-Runtime commit: 29369753f5]
2021-08-05 15:00:58 -04:00
Graham Sider 2dff9494db libhsakmt: Remove asic_family vars/helpers
Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I1bd054d8f9ffc56e2c48a5df4899966918f26e1b


[ROCm/ROCR-Runtime commit: 1ad1a2a817]
2021-08-05 15:00:58 -04:00
Graham Sider 875e9b9994 libhsakmt: Replace asic_family with gfx version
All conditional logic previously dependent on asic_family now dependent
on gfx version. As such, HSA_FORCE_ASIC_TYPE is now deprecated and
HSA_OVERRIDE_GFX_VERSION should be used instead.

device_info structs containing asic_family, eop_buffer_size, and
doorbell_size removed (alongside dev_lookup_table[]). eop_buffer_size
and doorbell_size now determined via macro, with eop_buffer_size and
full gfx version field being added to queue struct.

Certain funcs previously dependent on DID or GPU ID now dependent on
Node ID (due to use of get_gfxv_by_node_id()).

Fixes sleeper bug where ctl_stack_size and debug_memory_size were being
incorrectly programmed on gfx90a.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: Iaabdc5c73920ad83b4b379cd6086992357b8ff10


[ROCm/ROCR-Runtime commit: 8f883d0830]
2021-08-05 15:00:26 -04:00
Graham Sider 74cf1f0b88 libhsakmt: Use gfx version conditions in pmc_table.c
get_block_properties() switch statement now based on major GFX version
instead of asic_family. Addition for NPI bringup only needed on major
GFX revisions unless differing perf_counter_block assignment necessary.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: Ia02676d2a3a8f968b67feeafbab534ef4c01c0dd


[ROCm/ROCR-Runtime commit: 0b46d418c3]
2021-08-05 14:54:58 -04:00
Graham Sider 1aa103c629 libhsakmt: Use node_id in topology_is_svm_needed()
Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I7773ccb959e60e43b816477c5659f1fe835ecbbd


[ROCm/ROCR-Runtime commit: bc4aca039c]
2021-08-05 14:52:09 -04:00
Graham Sider eb66b1108c libhsakmt: Deprecate is_gfx700()
Condition generalized by
(get_gfxv_by_node_id(NodeId) == GFX_VERSION_KAVERI)

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: Iff4f77043e3ce8e48a9e84fbf257ebf59abf5bbb


[ROCm/ROCR-Runtime commit: 2f261a8dab]
2021-08-05 14:50:07 -04:00
Graham Sider 54eaccf072 libhsakmt: Add gfx version defines, helpers
Add defines for converting between full gfx version (in decimal) to
major/minor/stepping values, and major/minor/stepping values to full gfx
version (in hex). The first is to be used when grabbing the gfx version
from sysfs, the second when returning the gfx version in
get_gfxv_by_node_id() for comparisions in Thunk.

Add enum for defines of full gfx versions for various cards. These are
to be used in conditionals to replace CHIP_*/asic_family comparisons. On
NPI bringup, addition to this enum will not be required for
functionality unless explicitly needed for a conditional. Most ASICs in
this enum simply for completeness.

Add get_gfxv_by_node_id(): returns full gfx version in hex.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I9d1dba7fdd4a587a000eea2f4141a1d301bf4776


[ROCm/ROCR-Runtime commit: 8880610265]
2021-08-05 14:48:07 -04:00
Sean Keely e4b3eb87e2 Minor interface improvement to pointer info.
Take in const void* rather than void*.  This does not break the
abi or existing code.  Existing code would need to cast away any
const which is unnecessary and annoying.

Change-Id: I28787e8fab1b600bf6871ea82835e10a4f475c5b


[ROCm/ROCR-Runtime commit: 270d042ef8]
2021-08-04 16:43:23 -04:00
Kent Russell f1404ea392 CMakeLists: Re-enable pkgconfig, require libdrm
This was an implicit requirement, but the change to needing libdrm/drm.h
means we should be explicitly looking for this package during the build

Change-Id: I75064bf6f5477cb1ca99318681afca76c0060f72


[ROCm/ROCR-Runtime commit: 6778da4460]
2021-07-30 18:20:12 -04:00
Sean Keely 95bf93f650 Update README and increment minor version number.
APIs have been added and minimum cmake version number has been
changed.

Change-Id: Ic75849e6937c04faed2d206344df2cf9e9a78016


[ROCm/ROCR-Runtime commit: ed7eec14e1]
2021-07-30 17:13:17 -05:00
Sean Keely e96500d901 Add optional dependency on rocm-core.
Part of uninstall sanity changes.

Change-Id: I29f16470deb87e67050339f10bfb7cc1b5f9c1b2


[ROCm/ROCR-Runtime commit: 4907d4577b]
2021-07-30 16:39:37 -04:00
Sean Keely 2ddf2f8f82 Simplify RPM package building.
The need to run rpm outside of cpack seems to have passed.

Change-Id: I8d7d992e289a0a88fa11b57bf0401bc6740c266b


[ROCm/ROCR-Runtime commit: 471c1859ab]
2021-07-30 16:39:32 -04:00
Sean Keely ed1e858da7 Remove unused branches from DEB packaging scripts.
Branches are unused and emit noise to the console when running
commands for which we have no actions.

Change-Id: I1f8c49a20bd7f529172721f35d29665cfc8dc6a4


[ROCm/ROCR-Runtime commit: e8439cca08]
2021-07-30 16:39:25 -04:00
Sean Keely 951ec33ae0 Correct hsa_status_string strings.
Some strings were missing the human readable form of the error code.
Also unifying source formatting via clang-format.

Change-Id: I0bcc2ab77dda476904c684cc2c584a5c7e8230d4


[ROCm/ROCR-Runtime commit: 081ab00f8e]
2021-07-30 16:30:31 -04:00
Sean Keely c549aa71c3 Add missing HSA_STATUS_ERROR_INVALID_MEMORY_POOL string.
HSA_STATUS_ERROR_INVALID_MEMORY_POOL was missing from
hsa_status_string.

Change-Id: I9a9121d54a61f966d87081a55638397473bddbe4


[ROCm/ROCR-Runtime commit: 62b7c0ed3b]
2021-07-30 16:30:25 -04:00
Sean Keely 4fb0096393 Minor correction to debug messages.
Added missing \n.

Change-Id: I6e17459390c2c18819fc1decd8a6c91b7d7409cf


[ROCm/ROCR-Runtime commit: a0069904c8]
2021-07-30 16:30:18 -04:00
Sean Keely ddef80a37e Correct single character transcription errors in license text.
Somehow "and/or" was rendered as "and#or".

Change-Id: Ia8219e0241cd1c788e26a92b491523852e9a2f40


[ROCm/ROCR-Runtime commit: 0778969e89]
2021-07-30 16:28:53 -04:00
Sean Keely dd7c30ec6b Correct data race in GpuAgent::GetXgmiBlit.
Threads may race against xgmi_peer_list_ when dynamically assigning
peers to sdma engines.

Change-Id: I300c10f0cfa0ff7d6a5515364070a0895e2f4644


[ROCm/ROCR-Runtime commit: bb4dfbba1e]
2021-07-30 16:10:59 -04:00
Aaron Liu c451710944 libhsakmt: expand control stack size limit for all gfx103x
Expand check control stack size for Beige Goby, Van Gogh and Yellow Carp.

Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Change-Id: I6c8345bbb751eb9179fc740fe1674504b4295a5f


[ROCm/ROCR-Runtime commit: fc216a3668]
2021-07-30 10:24:25 -04:00
Aaron Liu 1b7bb8646c libhsakmt: reorder the list of GPUs in enum asic_family_type
Put CHIP_gfx90a next to CHIP_gfx908 to keep all the GFXv9
chips together.

Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Change-Id: I32b4b7f7746ae4bdaff7e178f13307c1bcfa93e1


[ROCm/ROCR-Runtime commit: 80e4cb6261]
2021-07-30 10:23:56 -04:00
Philip Yang 41b4ff5170 libhsakmt: update query pointer info document
Query pointer info return HsaPointerInfo with MemFlags for all pointer
type now.



Change-Id: I3c02b7b71ba0af953035e3ed9cd6bb6435bb9b65
Signed-off-by: Philip Yang <Philip.Yang@amd.com>


[ROCm/ROCR-Runtime commit: 991cde0656]
2021-07-29 21:10:38 -04:00
Philip Yang e826288132 kfdtest: fix KFDIPCTest on gfx1xxx
hsaKmtAllocMemory with mflags.HostAccess=1 will fail on desktop gfx1xxx GPU
because it's small bar PCIe. Remove this flag.

Child process exit status should use current_test_info, not unit test
info.



Change-Id: I060f23aa98a42251921d003878e70a409c92a4de
Signed-off-by: Philip Yang <Philip.Yang@amd.com>


[ROCm/ROCR-Runtime commit: 413979c319]
2021-07-29 21:10:17 -04:00
chen gong 820e03bd4c libhsakmt: add cyan skillfish support
Signed-off-by: chen gong <curry.gong@amd.com>
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
Change-Id: Ie26c2e156c9c4e68a6b36fe699adccf3f808b5e7


[ROCm/ROCR-Runtime commit: 860931557c]
2021-07-29 16:44:16 -04:00
Sean Keely b10954c185 Add global_flags reporting to pointer info.
global_flags reporting allows discovery of an allocation's memory
model (coarse, fine, kernarg).  This is critical on gfx90a and
also allows discovery of the memory model of IPC imports.

Change-Id: Icbc3c243ca20e264af5e1931becd2419f762c7ad


[ROCm/ROCR-Runtime commit: e3a01690a5]
2021-07-29 15:37:47 -05:00
Sean Keely 08cb823d21 Report SVM range queries with both coarse and fine grain as indeterminate.
Previously ranges were reported as fine if and only if they were
entirely fine.  Coarse and mixed ranges were reported as coarse.
For gfx90a it is critical to know if a range is coarse or fine as
fp atomics targeting fine do not function.  Range queried reporting
coarse must be able to be trusted so must only report coarse if the
entire region is coarse.

Change-Id: I29c654a2afcd6943961eb2455e3654dfdb1283b5


[ROCm/ROCR-Runtime commit: e6e66e8a05]
2021-07-29 15:34:58 -05:00
Sean Keely 4c6ea88cf5 Add HSA_CU_MASK
New environment variable HSA_CU_MASK allows users to
specify a cu mask to every queue allocated from any
GPU.  hsa_amd_queue_cu_set_mask is restricted from
escaping this mask.

A new API hsa_amd_queue_cu_get_mask is added to query
the current cu mask.

Change-Id: I846c03a5faaca9b95067c31db84b59cc9fce2f03


[ROCm/ROCR-Runtime commit: 4455250be1]
2021-07-29 02:23:34 -05:00
changzhu 5456bde2e2 kfdtest: blacklist some SVM test cases for gfx902 iommu path
Change-Id: I77f734df7ca65f2aa176548fd02ddac6036fe138
Signed-off-by: changzhu <Changfeng.Zhu@amd.com>


[ROCm/ROCR-Runtime commit: 3600cdfa01]
2021-07-29 00:02:57 -04:00
changzhu 0e9cdfecb9 kfdtest: take back SVM test cases for gfx90c
Change-Id: I28627f6eeaf9d213d7740849c6fadcccd91733c0
Signed-off-by: changzhu <Changfeng.Zhu@amd.com>


[ROCm/ROCR-Runtime commit: 1fe2225f52]
2021-07-28 15:44:02 +08:00
Sean Keely c7606d1dfc Provide hwloc dependency.
Some distros do not provide the proper hwloc version for rocrtst.
This packages the required version.

Change-Id: Iebc68250c33f309d6b50e850a0553685bac50563


[ROCm/ROCR-Runtime commit: 2c35469617]
2021-07-26 23:56:14 -04:00
Sean Keely 127ed837dc Revert "Revert "Split packaging into binary and dev packages.""
Correct deb and rpm package conflict declarations.
hsa-ext-rocr-dev was to be replaced.  Now that two packages
replace this package remove conflicts so that they do not block
eachother.

Change-Id: If25ea6cfd3d6d00398fd0a8d179860d3a92dc907


[ROCm/ROCR-Runtime commit: 770a42cb42]
2021-07-26 20:42:25 -05:00
Sean Keely 5b9b2f2468 Revert "Split packaging into binary and dev packages."
This reverts commit d12dbc3518.

Change-Id: I33cbcffe5695c4e45ebce37ce56177006a5e0f62


[ROCm/ROCR-Runtime commit: d2ccf44085]
2021-07-26 19:23:46 -05:00
Sean Keely d12dbc3518 Split packaging into binary and dev packages.
Conform with normal packaging behavior where a binary
and its development headers are in separate packages.

Change-Id: I91c58ea271a8e1c710c213060bca6d58d69287e6


[ROCm/ROCR-Runtime commit: 2c32cbea00]
2021-07-26 17:01:36 -05:00
Sean Keely 6bef819142 Add package splitting names to PROVIDES.
Preparation for splitting the package.  rocm-dev meta package
should be updated after this is merged and before splitting the
packages to avoid build breaks.

Change-Id: Iaad54ee72207285eaaa99e88cf1949bea7f29001


[ROCm/ROCR-Runtime commit: bea17130f7]
2021-07-23 18:33:09 -05:00
Philip Yang 0869422f81 kfdtest: KFDIPCTest BasicTest query shared memory
Parent process alloc memory with specific HsaMemFlags, child process
import the memory handle exported by parent process, query shared memory
pointer info, verify it has same HsaMemFlags.

If child process test failed, exit with error code to notify parent
process.

Change-Id: I5c9534e931b4565186d27124868799b893504c81
Signed-off-by: Philip Yang <Philip.Yang@amd.com>


[ROCm/ROCR-Runtime commit: 426b94015c]
2021-07-23 10:08:28 -04:00