Skip to content

Commit

Permalink
Intel/CI: Update dmabuf stage to support subdevice testing
Browse files Browse the repository at this point in the history
This commit updates the dmabuf stage to support tile-to-tile
testing based on hierarchy update to newer agama versions.

Signed-off-by: Juee Himalbhai Desai <[email protected]>
  • Loading branch information
Juee14Desai authored and zachdworkin committed Feb 7, 2024
1 parent ced402e commit fc869ae
Showing 1 changed file with 82 additions and 44 deletions.
126 changes: 82 additions & 44 deletions contrib/intel/jenkins/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,7 @@ def __init__(self, jobname, buildno, testname, hw, core_prov, fabric,
else 0

if util_prov:
self.prov = f'{self.core_prov}\;{self.util_prov}'
self.prov = f"{self.core_prov}\;{self.util_prov}"
else:
self.prov = self.core_prov

Expand All @@ -1073,27 +1073,63 @@ def __init__(self, jobname, buildno, testname, hw, core_prov, fabric,
'MLX5_SCATTER_TO_CQE' : '0'
}

self.tests = {
'H2H' : [
'write',
'read',
'send'
],
'H2D' : [
'write',
'read',
'send'
],
'D2H' : [
'write',
'read',
'send'
],
'D2D' : [
'write',
'read',
'send'
]
self.single_node_combinations = {
'H2H' : {
'-m malloc' : ['-m malloc']
},
'H2D' : {
'-m malloc' : [
'-m device -d 0',
'-m device -d 1'
]
},
'D2H' : {
'-m device -d 0' : ['-m malloc'],
'-m device -d 1' : ['-m malloc']
},
'D2D' : {
'-m device -d 0' : [
'-m device -d 1',
'-m device -d 2',
'-m device -d 3'
],
'-m device -d 1' : [
'-m device -d 2',
'-m device -d 3'
]
}
}

self.double_node_combinations = {
'H2H' : {
'-m malloc' : ['-m malloc']
},
'H2D' : {
'-m malloc' : [
'-m device -d 0',
'-m device -d 1',
'-m device -d 2'
]
},
'D2H' : {
'-m device -d 0' : ['-m malloc'],
'-m device -d 1' : ['-m malloc'],
'-m device -d 2' : ['-m malloc'],
'-m device -d 3' : ['-m malloc']
},
'D2D' : {
'-m device -d 0' : [
'-m device -d 0',
'-m device -d 1',
'-m device -d 2',
'-m device -d 3'
],
'-m device -d 1' : [
'-m device -d 1',
'-m device -d 2',
'-m device -d 3'
]
}
}

@property
Expand All @@ -1112,27 +1148,29 @@ def dmabuf_env(self):
def execute_cmd(self, test_type):
os.chdir(self.DMABUFtestpath)
base_cmd = ''
operations = ['write', 'read', 'send']
log_prefix = f"{os.environ['LOG_DIR']}/dmabuf_{self.n}"
if 'H2H' in test_type or 'D2H' in test_type:
base_cmd = f"{self.cmd} -m malloc -p {self.core_prov}"
if self.n == '1':
self.tests = self.single_node_combinations
else:
base_cmd = f"{self.cmd} -m device -d 0 -p {self.core_prov}"

for test in self.tests[test_type]:
client_command = f"{base_cmd} -t {test} {self.server}"
if 'send' in test:
server_command = f"{base_cmd} -t {test} "
else:
server_command = f"{base_cmd} "
RC = common.ClientServerTest(
f"ssh {self.server} {self.dmabuf_env()} {server_command}",
f"ssh {self.client} {self.dmabuf_env()} {client_command}",
f"{log_prefix}_server.log", f"{log_prefix}_client.log",
self.timeout
).run()

if RC == (0, 0):
print("------------------ TEST COMPLETED -------------------")
else:
print("------------------ TEST FAILED -------------------")
sys.exit(f"Exiting with returncode: {RC}")
self.tests = self.double_node_combinations
for operation in operations:
for key,value in self.tests[test_type].items():
for values in value:
server_command = f"{self.cmd} {values} -p {self.core_prov}"
if 'send' in operation:
server_command += f" -t {operation}"
base_cmd = f"-t {operation} -p {self.core_prov} {self.server}"
client_command = f"{self.cmd} {key} {base_cmd}"
RC = common.ClientServerTest(
f"ssh {self.server} {self.dmabuf_env()} {server_command}", \
f"ssh {self.client} {self.dmabuf_env()} {client_command}", \
f"{log_prefix}_server.log", f"{log_prefix}_client.log", \
self.timeout
).run()

if RC == (0, 0):
print("-------------- TEST COMPLETED ---------------")
else:
print("-------------- TEST FAILED ---------------")
sys.exit(f"Exiting with returncode: {RC}")

0 comments on commit fc869ae

Please sign in to comment.