Graf Tiomantas

37 Tiomáintí

Údar SHA1 Teachtaireacht Dáta
Longlong Yao 3b829d0e62 rocrtst: fix resource leak
Change-Id: Ib57dccad0b639539e1076daba31eef278f2cf638
Signed-off-by: Longlong Yao <Longlong.Yao@amd.com>
2024-09-23 15:04:43 -04:00
David Yat Sin 588a5a2fd3 rocrtst: Limit pool sizes to 2GB on emulator
Individual simple tests such as CPUAccessToGPUMemoryTest are taking
several hours on emulators as the total amount of VRAM keeps increasing.
Limit the pool sizes to 2GB, only on emulator.

Change-Id: I4b33e8549f89413da255731e6748f606ca64a663
2024-09-19 19:44:53 +00:00
Chris Freehill 1c6a4a55f1 rocrtst: change const arg to non-const
In rocrtst helper_funcs.h, a function argument that gets
written to was previously incorrectly marked as const.

Change-Id: If8cc6555ebfa974b9665d9d5b93de01bb45fde2c
2024-08-14 08:18:11 -05:00
David Yat Sin 99e31e43aa rocrtst: Add test for GPU access to memory
Add test to verify whether GPU shaders can read memory created using VMM
APIs.
Split VMM rocrtst to two separate groups: Basic and Access tests

Change-Id: Iead8d46125580c71ccd582e967c8e2e891e75c5e
2024-02-22 14:12:05 +00:00
David Yat Sin 5b28a1bc17 Fix compile error on certain gcc versions
Change-Id: I8a4fab76d1dcc576eb7706ab45fc786c0cab274a
2024-02-13 15:25:34 -05:00
David Yat Sin a69c1e9f39 VMM: rocrtst for basic virtual memory APIs
This is part of patch series for Virtual Memory API.

Change-Id: Ic3b44435cb09ad17d833b4a4b2551bd211b494e9
2024-01-17 10:25:09 -05:00
David Yat Sin d021055ada rocrtst:Add tag for extended-scope fine grain
Change-Id: I2a64cf3fb476271b0a5d025fb6989feb40d676bb
2023-10-03 15:36:20 -04:00
Sreekant Somasekharan ea2f832a43 rocrtst: Fix RoundToPowerOf2 function
Compiler behavior is undefined if the right operand is negative,
or greater than or equal to the width of the promoted left operand.
For release builds with address sanitizer enabled, this compiler
optimization behavior leads to unsupported queue size value since
current method shifts till 128 bits on a 64 bit value.

Change-Id: Iddcc15b43d2331bc8bf5fc3aa4725f76844655ec
Signed-off-by: Sreekant Somasekharan <sreekant.somasekharan@amd.com>
2023-06-19 19:17:49 -04:00
Graham Sider 0772e8d618 rocrtst: Throw on LocateKernelFile open() failures
Throw runtime error instead of returning empty string when open() fails
in LocateKernelFile()

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: Iafa360fbc2d3c9b01b9fe7ea4c11d70bd254ccce
2023-05-24 14:31:26 -04:00
jie1zhan 8a0fe6a832 Free the executable memory , when it don't used
Fix the issue of rocrtst test - The runtime failed to allocate the necessary resources

Change-Id: Ie4ffeb939fb322db068f3132a7973a359c204176
2022-07-29 15:16:37 -04:00
Sean Keely d27d4545e2 Add cu masking test.
Change-Id: I8b62ebd60f2edde3ea0b298f0353381855163fea
2022-06-28 11:22:42 -04:00
Sean Keely 534dc3f60c Correct rocrtst pool iterator.
GetGlobalMemoryPool had improper return codes for an iterator callback
and did not properly order the APU pool selection path.

Change-Id: I01ab9d23e2352be98d9718bc25889ad4f779d3ca
2021-10-16 05:02:05 -04:00
Sean Keely 74bcd6ee90 Locate kernel directory from device name.
Search child directories when locating device code.

Change-Id: I51515f002ad60878a2be0b6e9ee6416c67a1d799
2021-06-17 22:57:21 -04:00
Yifan Zhang 5977eb554f rocrtst: fix a test case setup issue in iommuv2 for APU
APU doesn't have non-KERNARG memory pool for cpu agent or
a global memory pool for gpu agent. Current setup check
fails as below. Change to a APU specific check method.

[==========] Running 45 tests from 5 test cases.
[----------] Global test environment set-up.
[----------] 1 test from rocrtst
[ RUN      ] rocrtst.Test_Example

    #### TEST NAME ####
Test Case Example

    #### TEST DESCRIPTION ####
Put a description of the test case here. Line breaks will be taken care of
on output, not here.

    #### TEST SETUP ####
The gpu device name is gfx902
Target HW Profile is HSA_PROFILE_FULL
Test can run on any profile. OK.
/home/jenkins/hsa/runtime/rocrtst/common/base_rocr_utils.cc:180: Failure
Value of: rocrtst::ProcessIterateError(err)
  Actual: 4096
Expected: HSA_STATUS_SUCCESS
Which is: 0
HSA_STATUS_ERROR: A generic error has occurred.
/home/jenkins/hsa/runtime/rocrtst/suites/test_common/test_case_template.cc:195: Failure
Value of: HSA_STATUS_SUCCESS
  Actual: 0
Expected: err
Which is: 4096
rocrtst64: /home/jenkins/hsa/runtime/rocrtst/common/base_rocr_utils.cc:416: hsa_kernel_dispatch_packet_t* rocrtst::WriteAQLToQueue(rocrtst::BaseRocR*, uint64_t*): Assertion `test->main_queue()' failed.
../shunit2: line 977:  1382 Aborted                 (core dumped) ./rocrtst$ROCRTST_BLD_BITS "$ROCRTST_ARGS" --gtest_output=xml:"$gtest_xml"
failed (failed to run rocrtst)

Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Change-Id: I03691bd4171b6e622231baf3dce4db2211eb47e7
2021-02-23 20:14:40 -05:00
Sean Keely 6182abf5e9 Add asserts and minimum values for kernarg alignment and utility functions.
Kernel argument size and alignment queries are not supported on
code object v3.

Change-Id: I1bdd34e2e62132f912ac39d80355efd3456df87c
2020-11-21 21:39:49 -06:00
Konstantin Zhuravlyov 3a08d0964e Implement Target ID Proposal
Changes from Konstantin Zhuravlyov, Tony Tye

Change-Id: I532801193afa9d5b8ac2a877b5497eab661f0597
2020-11-10 13:42:35 -05:00
Sean Keely e25ae1263b Remove references to finalizer header.
Change-Id: I6608c95268ab4bc66053d889cf7d5a30cd8fccab
2020-04-17 23:50:23 -04:00
Ramesh Errabolu 086b4b686c Fix Aql Header initialization
Change-Id: If23c12b28d22fb62b673038890f40bb0f3c3948b
2019-11-06 16:13:58 -05:00
Ramesh Errabolu 3201f68f72 Update memory allocation guide in using pool apis
This is to allow allocations in system memory that exceed sizes
reported by a CPU device

Change-Id: I3d10d192aafcefbe4107f69b7c5e30bf7f836619
2019-08-23 14:55:40 -04:00
Ramesh Errabolu 4a0d50f415 Handle thread creation error correctly
Change-Id: Iaa8811e245aa20ac107aef104847df3e455518f1
2019-08-05 15:39:54 -04:00
Chris Freehill 081a2cc875 rocrtst fixes for hsa_signal cleanup and aql packet dispatch
In several places aql packets were written to queue all at once
instead of doing the header atomically. These cases have been
fixed.

There were a few hsa_signal leaked that have been addressed.

There was some duplication of code that has been addressed.

Addresses ROCMOPS-456

Change-Id: Ia1869bc370f92e49ac560301df47741d5f76978e
2019-06-21 17:34:10 -05:00
Sean Keely bb980462e7 Fix IPC related hangs/faults in rocrtst.
IPC was failing due to calling fork when HSA was open.  The fix
was correcting incomplete cleanup in several other tests.

TestBase::Close (via CommonCleanUp) now checks that HSA is properly
closed between tests.

rocrtstPerf.Memory_Async_Copy uses hwloc which uses OpenCL which
has no shutdown routine.  Consequently this test can not cleanup
properly.  I added a hack to force HSA refcount to the value
it should have if OpenCL were cleaning up but this leaks resources
and potentially puts hwloc & OpenCL in a bad state.

OpenCL loads LLVM which installs some exit handlers.  Those handlers
can't execute in a child process and can't be removed since OpenCL
doesn't cleanup.  IPC hacks around this by aborting rather than exiting
in the child process.

Change-Id: I92326a73d7b11632208717d99728e6dafdc7d3ca
2019-06-19 01:03:52 -04:00
rohit pathania d8e47ba115 Modified memory atomics on non Large bar system and pool info test memcmp issue fix
Change-Id: I951fdb6c91508f43b1c51f7eb92870543fc58e53
2018-06-11 18:49:29 +05:30
rohit pathania 47af1d673e Memory Concurrent tests for pool Memory allocate, Memory free and get pool info
Change-Id: I6a1343348e400fe466e041d651adaa67be561a21
2018-05-14 01:30:54 -04:00
rohit pathania 7310312291 Resubmitted added and modified common utilities functions for rocrtest with faile to open file fix
Change-Id: Ie45668df1a15c1be7e8bdb10b967b98fb3024252
2017-12-18 05:06:22 -04:00
Kent Russell c3a880db7d Revert "added and modified common utilities functions for rocrtest"
This reverts commit 7e46704abb.

Change-Id: I825b210ce4fc831f8a978faf1c7d83d54408efa4
2017-12-15 06:04:50 -05:00
rohit pathania 7e46704abb added and modified common utilities functions for rocrtest
Change-Id: I80afa33a46b3d95058be306869e7ed54b2b7df64
2017-12-14 12:01:16 -05:00
Chris Freehill 75eb3316aa Make rocrtst use new rocm_smi library
Change-Id: Id688d6d6d5ff106a23f5b55eaca4e723c39433a3
2017-10-06 09:41:10 -05:00
Chris Freehill 3fa0b7e5b4 Fix build error in release version
Change-Id: I5b8378e4e771369ff2b2cc64ddfb44dde38d8d44
2017-09-28 23:47:51 -04:00
Chris Freehill 92e46584f8 Async mem. copy test with NUMA awareness
Change-Id: If655ac4c087be2d379e868aad83812f2437d78b9
2017-08-30 21:35:37 -04:00
Chris Freehill c85322d93d Remove dependency on hsa-runtime-tools
Change-Id: Ic4ce2bcbf1176e7eb859db39f21e7185691837e1
2017-08-17 15:39:35 -04:00
Chris Freehill ab2248132a Clearer/more concise variable names
Change-Id: Ib92211977066b728f19b2a7fe40639160a8262b3
2017-08-01 10:38:26 -05:00
Chris Freehill cf24f7bb78 Added max. single mem. allocation test.
Change-Id: Ie81c6af0502fde56225b1e197801cf04b474feb2
2017-07-31 12:04:55 -05:00
Chris Freehill a055531eb4 Update tests to use rocm-smi
Change-Id: Ia4692019460f4ba42a12ecba1f9e59576561c73e
2017-07-28 08:34:27 -04:00
Chris Freehill 8424fd6f23 Add rocm-smi c++ utility classes
Change-Id: I4362151abf84f89942bf2895b45fca498a28dfc9
2017-07-25 00:42:34 -04:00
Chris Freehill a12c5628ea Added dispatch time, async copy and test template rocrtst tests
Change-Id: I57a844ee65c36bd61616ee6d60d358303f51db56
2017-07-17 10:30:26 -05:00
Chris Freehill 8161ebb915 Refactored performance test code
Commented and flattened binary search sample.

Change-Id: Ib783292207c956d16003195924a3bcfbbde5039f
2017-05-11 14:45:45 -04:00