Skip to content

Commit

Permalink
[UR] Catch iterator exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Petr Vesely committed Jun 30, 2023
1 parent 458f62f commit 78641e7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scripts/core/PROG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ queue is created.
${x}QueueCreate(hContext, hDevice,
${X}_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE, &hQueue);
// Lanuch a kernel with 3D workspace partitioning
// Launch a kernel with 3D workspace partitioning
const uint32_t nDim = 3;
const size_t gWorkOffset = {0, 0, 0};
const size_t gWorkSize = {128, 128, 128};
Expand Down
13 changes: 9 additions & 4 deletions scripts/generate_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,15 @@ def _generate_valid_rst(fin, fout, namespace, tags, ver, rev, meta):
if code_block and 'function' == symbol_type:
# If function is split across multiple lines
# then join lines until a ';' is encountered.
line = line.strip()
while not line.endswith(';'):
_, n_line = next(iter)
line = line + n_line.strip()
try:
line = line.strip()
while not line.endswith(';'):
_, n_line = next(iter)
line = line + n_line.strip()
except StopIteration:
print(f"Function {line[:100]} was not terminated by a ';' character.")
error = True

words = re.sub(RE_EXTRACT_PARAMS, r"\1", line)
words = line.split(",")
if len(words) != len(meta['function'][symbol]['params']):
Expand Down

0 comments on commit 78641e7

Please sign in to comment.