Skip to content

Using AI check if there is any register access race in llk code among threads #1249

@amahmudTT

Description

@amahmudTT

Describe the bug

Some registers are accessed in multiple threads and not everywhere it is under a critical section. Checking for such a race manually was intractable given the number of scripts we would need to write manually, but with the use of AI we can many of the steps in an automated fashion. This way we should be able to check for races.

The steps could be

List all the names of registers accessed in a file using MMIO or without enclosing it in a mutex
Filter out the ones which are not thread specific
Tag the file as being used by packer/unpacker/math
Check if the range used by a thread overlaps with the range used by another thread or not.

There is some complicacy the access is within a function, but it is called within another function and the mutex is held in the calling function. But still AI might be able to handle that too.

Finally when this is done, make a consolidated script, which we should be able to run time to time to check for races.

This task should also accompany reducing the size of critical sections if possible. Currently a lot of code that do not have the potential to cause a race are also included inside critical sections, thus reducing the parallelism in the tensix engine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions