(self, args, tid, read_op)
| 41 | self.ctxt[ELAPSED_SEC] += end_time - start_time |
| 42 | |
| 43 | def _create_context(self, args, tid, read_op): |
| 44 | io_string = "Read" if read_op else "Write" |
| 45 | device_id, folder = args.mapping_list[tid] |
| 46 | filename = create_filename(folder, args.read, args.io_size, tid) |
| 47 | if args.read and not (os.path.isfile(filename) and os.path.getsize(filename) == args.io_size): |
| 48 | create_file(filename, args.io_size) |
| 49 | |
| 50 | task_log(tid, f'Allocate tensor of size {args.io_size} bytes') |
| 51 | |
| 52 | buffer = create_page_locked_tensor(args.io_size, True) |
| 53 | |
| 54 | task_log(tid, |
| 55 | f'{io_string} file {filename} of size {args.io_size} bytes from buffer on device {buffer.device}') |
| 56 | |
| 57 | task_log(tid, 'created deepspeed aio basic engine') |
| 58 | |
| 59 | ctxt = {} |
| 60 | ctxt[FILE] = filename |
| 61 | ctxt[NUM_BYTES] = args.io_size |
| 62 | ctxt[BUFFER] = buffer |
| 63 | ctxt[ELAPSED_SEC] = 0 |
| 64 | return ctxt |
no test coverage detected