kingwales
kingwales

Reputation: 139

How to learn and understand the pattern matching function for XLA?

I am learning XLA recently. XLA (Accelerated Linear Algebra) is a domain-specific compiler for linear algebra that can accelerate TensorFlow models with potentially no source code changes. Due to the lack of document, it is hard to learn some components systematically.

I am trying to understand the matcher such as [m::MaximumAnyOrder][1], m::Broadcast. https://github.com/tensorflow/tensorflow/blob/master/tensorflow/compiler/xla/service/gpu/cudnn_fused_conv_rewriter.cc#L607-L608 But I didn't the the function definition or document on these APIs. It seems they are not in the codebase of XLA.

Any experts can help me how to find the API definition or document to better understand how they work?

Upvotes: 0

Views: 113

Answers (1)

mikaraento
mikaraento

Reputation: 1714

MaximumAnyOrder is a macro expansion declared in https://github.com/tensorflow/tensorflow/blob/397f997d2882279f17377ffcf5e28855194310bc/tensorflow/compiler/xla/service/pattern_matcher.h#L2389. I don't think there is much documentation of such functions, you are expected to read the code.

Upvotes: 0

Related Questions