Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
Juee14Desai committed Jul 24, 2023
1 parent 9e01a42 commit 7a0b043
Show file tree
Hide file tree
Showing 4 changed files with 122 additions and 1 deletion.
12 changes: 12 additions & 0 deletions contrib/intel/jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,18 @@ pipeline {
}
}
}
stage ('DMABUF-Tests') {
agent { node { label 'ze' } }
options { skipDefaultCheckout() }
steps {
script {
dir ("${env.WORKSPACE}/${SCRIPT_LOCATION}/") {
run_middleware([["verbs", "rxm"]], "DMABUF-Tests", "dmabuf",
"fabrics-ci", "2")
}
}
}
}
stage ('ze-shm') {
steps {
script {
Expand Down
30 changes: 30 additions & 0 deletions contrib/intel/jenkins/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,5 +205,35 @@ def daos_cart_tests(core, hosts, mode, user_env, util):
runcarttests.execute_cmd()
print('-------------------------------------------------------------------')

def dmabuftests(core, hosts, mode, user_env, util):

rundmabuftests = tests.DMABUFTest(jobname=jbname,buildno=bno,
testname="DMABUF Tests", core_prov=core,
fabric=fab, hosts=hosts,
ofi_build_mode=mode, user_env=user_env,
util_prov=util)

print('-------------------------------------------------------------------')
if (rundmabuftests.execute_condn):
print(f"Running dmabuf H->H tests for {core}-{util}-{fab}")
rundmabuftests.execute_cmd('H2H')

print('---------------------------------------------------------------')
print(f"Running dmabuf H->D tests for {core}-{util}-{fab}")
rundmabuftests.execute_cmd('H2D')

print('---------------------------------------------------------------')
print(f"Running dmabuf D->H tests for {core}-{util}-{fab}")
rundmabuftests.execute_cmd('D2H')

print('---------------------------------------------------------------')
print(f"Running dmabuf D->D tests for {core}-{util}-{fab}")
rundmabuftests.execute_cmd('D2D')

print('---------------------------------------------------------------')
else:
print(f"Skipping {rundmabuftests.testname} as execute condition fails")
print('-------------------------------------------------------------------')

if __name__ == "__main__":
pass
6 changes: 5 additions & 1 deletion contrib/intel/jenkins/runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def __call__(self, parser, namespace, values, option_string=None):
parser.add_argument('--test', help="specify test to execute", \
choices = ['all', 'shmem', 'IMB', 'osu', 'oneccl', \
'mpichtestsuite', 'fabtests', 'onecclgpu', \
'fi_info', 'daos', 'multinode'])
'fi_info', 'daos', 'multinode', 'dmabuf'])

parser.add_argument('--imb_grp', help="IMB test group 1:[MPI1, P2P], \
2:[EXT, IO], 3:[NBC, RMA, MT]", choices=['1', '2', '3'])
Expand Down Expand Up @@ -137,6 +137,10 @@ def __call__(self, parser, namespace, values, option_string=None):
run.osu_benchmark(args_core, hosts, mpi,
ofi_build_mode, user_env,
args_util)

if (run_test == 'all' or run_test == 'dmabuf'):
run.dmabuftests(args_core, hosts, ofi_build_mode,
user_env, args_util)
else:
run.ze_fabtests(args_core, hosts, ofi_build_mode, way, user_env,
args_util)
Expand Down
75 changes: 75 additions & 0 deletions contrib/intel/jenkins/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -999,3 +999,78 @@ def execute_cmd(self):
common.run_command(outputcmd)
print("--------------------TEST COMPLETED----------------------")
os.chdir(curdir)

class DMABUFTest(Test):

def __init__(self, jobname, buildno, testname, core_prov, fabric,
hosts, ofi_build_mode, user_env, util_prov=None):

super().__init__(jobname, buildno, testname, core_prov, fabric,
hosts, ofi_build_mode, user_env, None, util_prov)
self.DMABUFtestpath = f'{self.libfab_installpath}/bin'
self.dmabuf_environ = {
'ZEX_NUMBER_OF_CCS' : '0:4,1:4',
'NEOReadDebugKeys' : '1',
'EnableImplicitScaling' : '0',
'MLX5_SCATTER_TO_CQE' : '0'
}

self.tests = {
'H2H' : [
'read',
'write',
'send'
],
'H2D' : [
'read',
'write',
'send'
],
'D2H' : [
'read',
'write',
'send'
],
'D2D' : [
'read',
'write',
'send'
]
}

def export_env(self):
for key, val in self.dmabuf_environ.items():
environ += f"export {key}={val}; "

return environ

@property
def execute_condn(self):
return True if (self.core_prov == 'verbs') \
else False

@property
def cmd(self):
return f"{self.DMABUFtestpath}/fi_xe_rdmabw "

def execute_cmd(self, test_type):
curr_dir = os.getcwd()
server_cmd = ''
if 'H2H' in test_type or 'D2H' in test_type:
server_cmd = f"{self.cmd} -m malloc "
else:
server_cmd = f"{self.cmd} -m device -d 0 "
for test in self.tests[test_type]:
if 'send' in test:
command = f"{server_cmd} -t {test} | "
#command += "'&' "
command += f"{server_cmd} -t {test} {self.server} "
else:
command = f"{server_cmd} | "
#command += "'&' "
command += f"{server_cmd} -t {test} {self.server} "

outputcmd = shlex.split(command)
common.run_command(outputcmd)
print("--------------------TEST COMPLETED----------------------")
os.chdir(curr_dir)

0 comments on commit 7a0b043

Please sign in to comment.