No public description
PiperOrigin-RevId: 557490568
This commit is contained in:
		
							parent
							
								
									ff3f0433d3
								
							
						
					
					
						commit
						ff17846c6a
					
				
							
								
								
									
										2
									
								
								third_party/halide.BUILD
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								third_party/halide.BUILD
									
									
									
									
										vendored
									
									
								
							| 
						 | 
					@ -42,7 +42,7 @@ cc_library(
 | 
				
			||||||
cc_library(
 | 
					cc_library(
 | 
				
			||||||
    name = "lib_halide_static",
 | 
					    name = "lib_halide_static",
 | 
				
			||||||
    srcs = select({
 | 
					    srcs = select({
 | 
				
			||||||
        "@mediapipe//mediapipe:windows": [
 | 
					        "@halide//:halide_config_windows_x86_64": [
 | 
				
			||||||
            "bin/Release/Halide.dll",
 | 
					            "bin/Release/Halide.dll",
 | 
				
			||||||
            "lib/Release/Halide.lib",
 | 
					            "lib/Release/Halide.lib",
 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										12
									
								
								third_party/halide/BUILD.bazel
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								third_party/halide/BUILD.bazel
									
									
									
									
										vendored
									
									
								
							| 
						 | 
					@ -28,13 +28,13 @@ halide_library_runtimes()
 | 
				
			||||||
        name = target_name,
 | 
					        name = target_name,
 | 
				
			||||||
        actual = select(
 | 
					        actual = select(
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                "@mediapipe//mediapipe:macos_x86_64": "@macos_x86_64_halide//:%s" % target_name,
 | 
					                ":halide_config_linux_x86_64": "@linux_halide//:%s" % target_name,
 | 
				
			||||||
                "@mediapipe//mediapipe:macos_arm64": "@macos_arm_64_halide//:%s" % target_name,
 | 
					                ":halide_config_macos_x86_64": "@macos_x86_64_halide//:%s" % target_name,
 | 
				
			||||||
                "@mediapipe//mediapipe:windows": "@windows_halide//:%s" % target_name,
 | 
					                ":halide_config_macos_arm64": "@macos_arm_64_halide//:%s" % target_name,
 | 
				
			||||||
                # Assume Linux x86_64 by default.
 | 
					                ":halide_config_windows_x86_64": "@windows_halide//:%s" % target_name,
 | 
				
			||||||
                # TODO: add mediapipe configs for linux to avoid assuming it's the default.
 | 
					                # deliberately no //condition:default clause here
 | 
				
			||||||
                "//conditions:default": "@linux_halide//:%s" % target_name,
 | 
					 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
 | 
					            no_match_error = "Compiling Halide code requires that the build host is one of Linux x86-64, Windows x86-64, macOS x86-64, or macOS arm64.",
 | 
				
			||||||
        ),
 | 
					        ),
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
    for target_name in [
 | 
					    for target_name in [
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										37
									
								
								third_party/halide/halide.bzl
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										37
									
								
								third_party/halide/halide.bzl
									
									
									
									
										vendored
									
									
								
							| 
						 | 
					@ -82,22 +82,22 @@ def halide_runtime_linkopts():
 | 
				
			||||||
# Map of halide-target-base -> config_settings
 | 
					# Map of halide-target-base -> config_settings
 | 
				
			||||||
_HALIDE_TARGET_CONFIG_SETTINGS_MAP = {
 | 
					_HALIDE_TARGET_CONFIG_SETTINGS_MAP = {
 | 
				
			||||||
    # Android
 | 
					    # Android
 | 
				
			||||||
    "arm-32-android": ["@mediapipe//mediapipe:android_arm"],
 | 
					    "arm-32-android": ["@halide//:halide_config_android_arm"],
 | 
				
			||||||
    "arm-64-android": ["@mediapipe//mediapipe:android_arm64"],
 | 
					    "arm-64-android": ["@halide//:halide_config_android_arm64"],
 | 
				
			||||||
    "x86-32-android": ["@mediapipe//mediapipe:android_x86"],
 | 
					    "x86-32-android": ["@halide//:halide_config_android_x86_32"],
 | 
				
			||||||
    "x86-64-android": ["@mediapipe//mediapipe:android_x86_64"],
 | 
					    "x86-64-android": ["@halide//:halide_config_android_x86_64"],
 | 
				
			||||||
    # iOS
 | 
					    # iOS
 | 
				
			||||||
    "arm-32-ios": ["@mediapipe//mediapipe:ios_armv7"],
 | 
					    "arm-32-ios": ["@halide//:halide_config_ios_arm"],
 | 
				
			||||||
    "arm-64-ios": ["@mediapipe//mediapipe:ios_arm64", "@mediapipe//mediapipe:ios_arm64e"],
 | 
					    "arm-64-ios": ["@halide//:halide_config_ios_arm64"],
 | 
				
			||||||
    # OSX (or iOS simulator)
 | 
					    # OSX (or iOS simulator)
 | 
				
			||||||
    "x86-32-osx": ["@mediapipe//mediapipe:ios_i386"],
 | 
					    "x86-32-osx": ["@halide//:halide_config_macos_x86_32", "@halide//:halide_config_ios_x86_32"],
 | 
				
			||||||
    "x86-64-osx": ["@mediapipe//mediapipe:macos_x86_64", "@mediapipe//mediapipe:ios_x86_64"],
 | 
					    "x86-64-osx": ["@halide//:halide_config_macos_x86_64", "@halide//:halide_config_ios_x86_64"],
 | 
				
			||||||
    "arm-64-osx": ["@mediapipe//mediapipe:macos_arm64"],
 | 
					    "arm-64-osx": ["@halide//:halide_config_macos_arm64"],
 | 
				
			||||||
    # Windows
 | 
					    # Windows
 | 
				
			||||||
    "x86-64-windows": ["@mediapipe//mediapipe:windows"],
 | 
					    "x86-64-windows": ["@halide//:halide_config_windows_x86_64"],
 | 
				
			||||||
    # Linux
 | 
					    # Linux
 | 
				
			||||||
    # TODO: add mediapipe configs for linux to avoid assuming it's the default.
 | 
					    "x86-64-linux": ["@halide//:halide_config_linux_x86_64"],
 | 
				
			||||||
    "x86-64-linux": ["//conditions:default"],
 | 
					    # deliberately nothing here using //conditions:default
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
_HALIDE_TARGET_MAP_DEFAULT = {
 | 
					_HALIDE_TARGET_MAP_DEFAULT = {
 | 
				
			||||||
| 
						 | 
					@ -618,6 +618,19 @@ def _standard_library_runtime_names():
 | 
				
			||||||
    return collections.uniq([_halide_library_runtime_target_name(f) for f in _standard_library_runtime_features()])
 | 
					    return collections.uniq([_halide_library_runtime_target_name(f) for f in _standard_library_runtime_features()])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def halide_library_runtimes(compatible_with = []):
 | 
					def halide_library_runtimes(compatible_with = []):
 | 
				
			||||||
 | 
					    # Note that we don't use all of these combinations
 | 
				
			||||||
 | 
					    # (and some are invalid), but that's ok.
 | 
				
			||||||
 | 
					    for cpu in ["arm", "arm64", "x86_32", "x86_64"]:
 | 
				
			||||||
 | 
					        for os in ["android", "linux", "windows", "ios", "macos"]:
 | 
				
			||||||
 | 
					            native.config_setting(
 | 
				
			||||||
 | 
					                name = "halide_config_%s_%s" % (os, cpu),
 | 
				
			||||||
 | 
					                constraint_values = [
 | 
				
			||||||
 | 
					                    "@platforms//os:%s" % os,
 | 
				
			||||||
 | 
					                    "@platforms//cpu:%s" % cpu,
 | 
				
			||||||
 | 
					                ],
 | 
				
			||||||
 | 
					                visibility = ["//visibility:public"],
 | 
				
			||||||
 | 
					            )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    unused = [
 | 
					    unused = [
 | 
				
			||||||
        _define_halide_library_runtime(f, compatible_with = compatible_with)
 | 
					        _define_halide_library_runtime(f, compatible_with = compatible_with)
 | 
				
			||||||
        for f in _standard_library_runtime_features()
 | 
					        for f in _standard_library_runtime_features()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user