MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / ThreeFryBitGenerator

Function ThreeFryBitGenerator

tensorflow/compiler/xla/client/lib/prng.cc:436–455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

434} // namespace
435
436RngOutput ThreeFryBitGenerator(XlaOp key, XlaOp initial_state,
437 const Shape& shape) {
438 PrimitiveType type = shape.element_type();
439 switch (type) {
440 case F32:
441 case U32:
442 case S32:
443 return ThreeFryRngBit32(key, initial_state, shape);
444 case F64:
445 case U64:
446 case S64:
447 return ThreeFryRngBit64(key, initial_state, shape);
448 default:
449 return {key.builder()->ReportError(Unimplemented(
450 "Types other than F32, F64, U32, S32, U64 and S64 "
451 "are not implemented by ThreeFryBitGenerator; got %s",
452 primitive_util::LowercasePrimitiveTypeName(type))),
453 initial_state};
454 }
455}
456
457RngOutput PhiloxBitGenerator(XlaOp key, XlaOp initial_state,
458 const Shape& shape) {

Callers

nothing calls this directly

Calls 6

ThreeFryRngBit32Function · 0.85
ThreeFryRngBit64Function · 0.85
UnimplementedFunction · 0.85
element_typeMethod · 0.45
ReportErrorMethod · 0.45
builderMethod · 0.45

Tested by

no test coverage detected