Conversation
ClientManager.add_clients dropped a client silently when one of its
class was already in the trace, and a client of another class with the
same NAME replaced the first one. So two Sanitizer(compile=True)
instances for different targets left only the first: the second never
compiled, its last_status stayed None, and nothing said so.
A client passed to a trace is now in it afterwards, or add_clients
raises:
- adding the same object again changes nothing;
- IR clients are all kept, so a trace can hold one instance of a class
per target, each compiled for its own target with its own verdict;
- a second interpreting client of one NAME raises ValueError, since one
interpreted run serves one client per name;
- a client named by string ("sanitizer") is a no-op when the trace
already has one of that name, as no settings of the caller's are lost.
ClientManager.clients is now a list in trace order, and get_client
returns the first client of a NAME.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #482 (
ir-mode-lowering); the reproduction needsSanitizer(compile=True)from #480. The core change is intilelens/core/client.py, which is identical from #479 to #482, so it can also be folded lower in the stack.Problem
ClientManager.add_clientssilently dropped a client when one of its class was already in the trace, and a client of another class with the sameNAMEsilently replaced the first. So two compiled sanitizers for different targets kept only the first:The same loss hit eager clients, e.g.
Sanitizer(abort_on_error=False)stacked on an existing Sanitizer was dropped without a word.Change
A client passed to a trace is now in the trace afterwards, or
add_clientsraises; nothing is dropped silently:NAMEraisesValueError(with the "trace the kernel twice" advice the launch-conflict error gives), since one interpreted run serves one client per name.trace("sanitizer")) is a no-op when the trace already has a client of that name: no settings of the caller's are lost, and the documented stacked-decorator case intest_trace_decorator_add_clientskeeps working. The string is resolved to its class before anything is constructed.API notes:
ClientManager.clientsis now a list in trace order (it was aNAME-keyed dict);get_client(name)returns the first client of thatNAME.NAMEIR client no longer replaces the existing one; it is added beside it, so a skip/run conflict between them is now raised.Tests
test_sanitizers_for_two_targets_share_one_trace(end to end,cuda:80ok /cuda:90violations in one launch),test_instances_of_one_ir_client_class_keep_their_own_targets,test_add_clients_keeps_every_ir_client_instance,test_add_clients_refuses_a_second_interpreting_client_of_one_name, plus a refusal check intest_trace_decorator_add_clients. All of these fail on the base branch for the reason above.clientsas a dict, andtest_launch_conflict_check_sees_every_ir_client(formerly asserted the replacement).Commands (Triton 3.6, CPU only):
Full suite: 1607 passed, 14 failed. The 14 fail identically on the base branch and are environment-related here: Gluon
gfx1250.clusterimport (6),tile-*executables not on PATH (5), and the three knowntest_sanitizer.pyfailures.test_gluon.pywas ignored because it fails to collect for the same Gluon import reason.Not in this PR
Launch.recordsboth carryclient="compiled_sanitizer"and no target; they are told apart by trace order or by each instance'slast_verdict.patch_opre-wraps the original op for each client, so only the last client's op callbacks fire.